moot and unposixy error message

2008-08-18 Thread Benno Schulenberg
Hi, In src/od.c around line 1820 it says this: if (limit_bytes_to_format) { end_offset = n_bytes_to_skip + max_bytes_to_format; if (end_offset < n_bytes_to_skip) error (EXIT_FAILURE, 0, _("skip-bytes + read-bytes is too large")); } Since max_bytes_to_format cannot

Re: moot and unposixy error message

2008-08-18 Thread Paul Eggert
Benno Schulenberg <[EMAIL PROTECTED]> writes: > Since max_bytes_to_format cannot be negative, the second 'if' will > never trigger, so the whole six lines are moot. It can trigger if there is an arithmetic overflow. > Further, the Open Group says that 'od' should not produce an error > when '-

Re: moot and unposixy error message

2008-08-18 Thread Andreas Schwab
Benno Schulenberg <[EMAIL PROTECTED]> writes: > Hi, > > In src/od.c around line 1820 it says this: > > if (limit_bytes_to_format) > { > end_offset = n_bytes_to_skip + max_bytes_to_format; > if (end_offset < n_bytes_to_skip) > error (EXIT_FAILURE, 0, _("skip-bytes + read-b

Re: moot and unposixy error message

2008-08-19 Thread Benno Schulenberg
Andreas Schwab wrote: > But the sum can overflow, and since the involved types are > unsigned this has defined (wrap-around) behaviour. Thanks. I felt I must be overlooking something, but couldn't figure out what. > > Further, the Open Group says that 'od' should not produce an > > error when '