[Info-vax] %SYSTEM-F-ACCVIO in LIBOTS after several hours

Arne Vajhøj arne at vajhoej.dk
Wed Mar 9 10:07:21 EST 2022


On 3/9/2022 9:52 AM, Mark Daniel wrote:
> On 10/3/22 1:19 am, Mark Daniel wrote:
> 8< snip 8<
>>> And similar for aCacheIdx I presume.
>>
>> Yes.
>>
>>        idx = nCacheIdx++ % CACHE_MAX;
> 8< snip 8<
> 
> Oops...
> 
>        idx = aCacheIdx++ % CACHE_MAX;

Something is missing.

idx = aCacheIdx++ % CACHE_MAX;
sprintf (ares[aCacheIdx], "[%s]", strerror(errno));

must be equivalent of:

idx = aCacheIdx % CACHE_MAX;
aCacheIdx = aCacheIdx + 1;
sprintf (ares[aCacheIdx], "[%s]", strerror(errno));

and that does not limit aCacheIdx.

Typo?

Arne





More information about the Info-vax mailing list