truncate: handle the case in which off_t != intmax_t
authorJim Meyering <meyering@redhat.com>
Wed, 25 Jun 2008 21:15:06 +0000 (23:15 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 26 Jun 2008 05:48:25 +0000 (07:48 +0200)
commit3d309aa725e529a5e90aacc5594565e21f966537
tree06819a06087f0d60dd30c13fd66a370e19c8953e
parent4f4700cca8927c961ea3319b830b866f036cd990
truncate: handle the case in which off_t != intmax_t

* src/truncate.c (parse_len): Use a temporary of type intmax_t,
rather than off_t; detect out of range [OFF_T_MIN..OFF_T_MAX].
(main) [IF_LINT]: Initialize, to avoid an unwarranted
"may be used uninitialized" warning.
Reported by Michael Geng.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
src/truncate.c