summaryrefslogtreecommitdiff
path: root/addext.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2009-03-17 21:46:21 +0100
committerAndreas Gruenbacher <agruen@suse.de>2009-03-17 21:46:21 +0100
commite930d168adfce7a64caf4852892f43deacd94fc5 (patch)
tree8333fef12f8a0fc9bd7ff1bacd24a008020e6c41 /addext.c
parentaa0d4dd83795826383431d0892444827bf656687 (diff)
downloadpatch-2.5.9.tar.gz
Import of patch-2.5.9.tar.gzv2.5.9
Diffstat (limited to 'addext.c')
-rw-r--r--addext.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/addext.c b/addext.c
index 571e3c2..a69c174 100644
--- a/addext.c
+++ b/addext.c
@@ -1,5 +1,7 @@
/* addext.c -- add an extension to a file name
- Copyright 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+
+ Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -83,7 +85,11 @@ addext (char *filename, char const *ext, int e)
*s = c;
}
if (0 <= name_max || errno == 0)
- slen_max = name_max == (size_t) name_max ? name_max : -1;
+ {
+ long size = slen_max = name_max;
+ if (name_max != size)
+ slen_max = -1;
+ }
}
#endif