]> git.ipfire.org Git - thirdparty/coreutils.git/commit
touch: placate static analyzers: no NULL-deref is possible
authorJim Meyering <meyering@redhat.com>
Tue, 24 May 2011 18:33:27 +0000 (20:33 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 25 May 2011 06:25:54 +0000 (08:25 +0200)
commitdac67b8cc244c796a771565457939371b0b7b035
treec7bbae7fbad42c8aa3b688e2e15efa6fd5266b7c
parent7d44751f0ea9d353c14edffbf89dc61dcafa8f22
touch: placate static analyzers: no NULL-deref is possible

* src/touch.c (main): Avoid even the hint of possibility that
we'd dereference NULL upon localtime failure.  Coverity reported
the potential, but it appears not to be possible, since posixtime
rejects any time for which the subsequent localtime would return NULL.
See http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1253
src/touch.c