Whamcloud - gitweb
subst: clean up various coverity nits
authorTheodore Ts'o <tytso@mit.edu>
Fri, 3 Jan 2014 05:26:43 +0000 (00:26 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 5 Jan 2014 00:11:37 +0000 (19:11 -0500)
commit2873927d15ffb9ee9ed0e2700791a0e519c715aa
tree6a88f2d88eac3cdfb063160123be12607b8e9697
parent75954ccf2a4fb2a5da632e7988450afee5e02509
subst: clean up various coverity nits

Add appropriate error checking for all error returns, and only open
each file that we need to manipulate once, to avoid potential
time-of-check/time-of-use races.  (Not that this is likely for this
program, but the result is much more clean.)

We also preserve the atime in the case where the file has not changed.

Addresses-Coverty-Id: #709537
Addresses-Coverty-Id: #1049150
Addresses-Coverty-Id: #1049151

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
configure
configure.in
lib/config.h.in
util/Makefile.in
util/subst.c