]> git.ipfire.org Git - thirdparty/coreutils.git/commit
timeout: remove problematic casts
authorPádraig Brady <P@draigBrady.com>
Tue, 23 Dec 2008 09:36:22 +0000 (09:36 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 23 Dec 2008 10:29:05 +0000 (10:29 +0000)
commitf144582e176eda6195e72a505f42d809a3749bfb
tree0fcdeabee9a100564a8fd8f47bcd441fb26b2769
parent9a913a24614ec323492a4e7b73724380eadba42f
timeout: remove problematic casts

* src/timeout.c (apply_time_suffix): Change input parameter from
unsigned int to unsigned long, which is the type of the variable it's
actually manipulating.  This removes the need for the cast which was
giving a warning with the gcc options: -fstrict-aliasing
-Wstrict-aliasing.  Also add a check for overflow possible on 16-bit
platforms, and fix indents.
(main): Remove a redundant cast in the alarm() call.
src/timeout.c