summaryrefslogtreecommitdiff
path: root/src/inp.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2012-09-19 01:52:10 +0200
committerAndreas Gruenbacher <agruen@linbit.com>2012-09-19 03:07:31 +0200
commit59609b50c538db1805161cb8afe9986f82b9759a (patch)
tree9f4d169f7f12fe837718829e3c7a8b9f607fc6c0 /src/inp.c
parentb578985c3cdf160ad58b43715bdfa324cdf15618 (diff)
downloadpatch-59609b50c538db1805161cb8afe9986f82b9759a.tar.gz
Introduce function to lstat all input files
* src/util.c (stat_file): New function. (move_file): Use here. * src/util.h (stat_file): Declare here. * src/inp.c (get_input_file): Use here. * src/patch.c (main): Use here. (delete_file_later): Use here. * src/pch.c (there_is_another_patch): Use here. (intuit_diff_type): Use here.
Diffstat (limited to 'src/inp.c')
-rw-r--r--src/inp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inp.c b/src/inp.c
index 5a42e75..386dc9e 100644
--- a/src/inp.c
+++ b/src/inp.c
@@ -138,7 +138,7 @@ get_input_file (char const *filename, char const *outname, mode_t file_type)
char *getbuf;
if (inerrno == -1)
- inerrno = lstat (filename, &instat) == 0 ? 0 : errno;
+ inerrno = stat_file (filename, &instat);
/* Perhaps look for RCS or SCCS versions. */
if (S_ISREG (file_type)