On Tue, Dec 6, 2016 at 9:08 AM, Michael Forney <mfor...@mforney.org> wrote:
> On Mon, Dec 5, 2016 at 4:47 AM, Silvan Jegen <s.je...@gmail.com> wrote:
>> From what I understand, max is an off_t which is signed and set to -1
>> (if not changed by a command line flag). If we cast this to the
>> unsigned size_t we get a very big number in the case where 'max' is
>> not set by a flag and the buffer size is used instead. Looks correct
>> to me.
>
> I will switch it back to check if max >= 0, because I think there
> could be a problem if off_t was larger than size_t.

As far as I can tell, both of these *may* be defined as 64-bit
integers. I would assume that there exists no programming environment
where only one of them is defined as a 64-bit integer and the other
one isn't so the bit-size should always be the same.

Checking for "max >= 0" may be clearer in any case though.

Reply via email to