Re: [PATCH v2 3/1] t-strvec: tighten .alloc check in check_strvec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <l.s.r@xxxxxx> writes:

>>>  		    check_uint((vec)->nr, ==, ARRAY_SIZE(expect) - 1) && \
>>> -		    check_uint((vec)->nr, <=, (vec)->alloc)) { \
>>> +		    ((vec)->v == empty_strvec ? \
>>> +		     check_uint((vec)->nr, ==, (vec)->alloc) : \
>>> +		     check_uint((vec)->nr, <, (vec)->alloc))) { \
>>
>> Not a huge deal but with empty_strvec, don't we want to barf if
>> nr==alloc==1?
>
> Yes, and that's handled by the comparison with ARRAY_SIZE(expect) - 1
> above.

Ah, OK, thanks.






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux