[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
moot and unposixy error message
From: |
Benno Schulenberg |
Subject: |
moot and unposixy error message |
Date: |
Mon, 18 Aug 2008 23:15:37 +0200 |
User-agent: |
KMail/1.9.9 |
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 be negative, the second 'if' will
never trigger, so the whole six lines are moot.
Further, the Open Group says that 'od' should not produce an error
when '-j' plus '-N' is longer than the file, so the above section
can be removed.
http://www.opengroup.org/onlinepubs/7990989775/xcu/od.html --
"If count bytes of input (after successfully skipping, if -j skip
is specified) are not available, it will not be considered an error;
the od utility will format the input that is available."
Benno
- moot and unposixy error message,
Benno Schulenberg <=