diff options
author | ngie <ngie@FreeBSD.org> | 2016-06-08 17:32:41 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-06-08 17:32:41 +0000 |
commit | f3d2358a821eb701f0b18e11bb617d495950dc3b (patch) | |
tree | b1dd431b8ac75c99d0d5a4d36ce5d68a9c8672cf /contrib/diff/lib | |
parent | d458a9c36b88dabc0b9567d8b60e86e34698be7f (diff) | |
download | FreeBSD-src-f3d2358a821eb701f0b18e11bb617d495950dc3b.zip FreeBSD-src-f3d2358a821eb701f0b18e11bb617d495950dc3b.tar.gz |
MFC r299778:
Use a consistent errno save/restore pattern before running strtoul
- Save errno
- Set errno to 0
- Call strtoul
- Test errno (optional, but many calls to strtoul did this afterwards)
Some of the code was setting errno = 0 after calling strtoul, not setting
errno = 0, or setting errno to saved_errno after the call, but before the
test. These all have unwanted behavioral side-effects, depending on the
initial value of errno and whether or not the input to strtoul was correct
or incorrect.
Diffstat (limited to 'contrib/diff/lib')
0 files changed, 0 insertions, 0 deletions