aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-01-28 19:14:17 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-01-28 19:14:17 +0100
commitaa4f9a2fd8a077c4e61e78fc397b47e541b0c140 (patch)
tree9b8ed7e1957125acbc7a5efb1318d9d042b831f5
parent4907f6ec58bfe1f7622027669c53df208054d334 (diff)
downloadbusybox-w32-aa4f9a2fd8a077c4e61e78fc397b47e541b0c140.tar.gz
busybox-w32-aa4f9a2fd8a077c4e61e78fc397b47e541b0c140.tar.bz2
busybox-w32-aa4f9a2fd8a077c4e61e78fc397b47e541b0c140.zip
libbb/copy_file.c: use smallints instead of signed chars
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/copy_file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 57d9dbfdb..9333a8d49 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -78,9 +78,9 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
78 /* NB: each struct stat is ~100 bytes */ 78 /* NB: each struct stat is ~100 bytes */
79 struct stat source_stat; 79 struct stat source_stat;
80 struct stat dest_stat; 80 struct stat dest_stat;
81 signed char retval = 0; 81 smallint retval = 0;
82 signed char dest_exists = 0; 82 smallint dest_exists = 0;
83 signed char ovr; 83 smallint ovr;
84 84
85/* Inverse of cp -d ("cp without -d") */ 85/* Inverse of cp -d ("cp without -d") */
86#define FLAGS_DEREF (flags & (FILEUTILS_DEREFERENCE + FILEUTILS_DEREFERENCE_L0)) 86#define FLAGS_DEREF (flags & (FILEUTILS_DEREFERENCE + FILEUTILS_DEREFERENCE_L0))
@@ -147,7 +147,6 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
147 return -1; 147 return -1;
148 } 148 }
149 149
150 /* Create DEST */
151 if (dest_exists) { 150 if (dest_exists) {
152 if (!S_ISDIR(dest_stat.st_mode)) { 151 if (!S_ISDIR(dest_stat.st_mode)) {
153 bb_error_msg("target '%s' is not a directory", dest); 152 bb_error_msg("target '%s' is not a directory", dest);
@@ -156,6 +155,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
156 /* race here: user can substitute a symlink between 155 /* race here: user can substitute a symlink between
157 * this check and actual creation of files inside dest */ 156 * this check and actual creation of files inside dest */
158 } else { 157 } else {
158 /* Create DEST */
159 mode_t mode; 159 mode_t mode;
160 saved_umask = umask(0); 160 saved_umask = umask(0);
161 161