summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-01-28 18:14:17 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-01-28 18:14:17 (GMT)
commitaa4f9a2fd8a077c4e61e78fc397b47e541b0c140 (patch)
tree9b8ed7e1957125acbc7a5efb1318d9d042b831f5
parent4907f6ec58bfe1f7622027669c53df208054d334 (diff)
downloadbusybox-aa4f9a2fd8a077c4e61e78fc397b47e541b0c140.tar.gz
busybox-aa4f9a2fd8a077c4e61e78fc397b47e541b0c140.tar.bz2
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 57d9dbf..9333a8d 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)
/* NB: each struct stat is ~100 bytes */
struct stat source_stat;
struct stat dest_stat;
- signed char retval = 0;
- signed char dest_exists = 0;
- signed char ovr;
+ smallint retval = 0;
+ smallint dest_exists = 0;
+ smallint ovr;
/* Inverse of cp -d ("cp without -d") */
#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)
return -1;
}
- /* Create DEST */
if (dest_exists) {
if (!S_ISDIR(dest_stat.st_mode)) {
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)
/* race here: user can substitute a symlink between
* this check and actual creation of files inside dest */
} else {
+ /* Create DEST */
mode_t mode;
saved_umask = umask(0);