summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-09-07 09:41:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-09-07 09:41:44 +0000
commite32e8ed5a523cb213986bdc7a8e7e6469d3bccdd (patch)
treecb42102411e6ec8f7a77a96d5b7a3afb16a56b75
parentfaeef4febdbbf4ed0fdd6962e23abdd0fedfd6b0 (diff)
Do not incorrectly sign-extend a mode_t value.
ok deraadt@
-rw-r--r--usr.bin/ar/extract.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ar/extract.c b/usr.bin/ar/extract.c
index d4ca22c8da8..81aa3a404a2 100644
--- a/usr.bin/ar/extract.c
+++ b/usr.bin/ar/extract.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extract.c,v 1.6 2003/06/12 20:58:08 deraadt Exp $ */
+/* $OpenBSD: extract.c,v 1.7 2004/09/07 09:41:43 miod Exp $ */
/* $NetBSD: extract.c,v 1.5 1995/03/26 03:27:53 glass Exp $ */
/*-
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)extract.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: extract.c,v 1.6 2003/06/12 20:58:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: extract.c,v 1.7 2004/09/07 09:41:43 miod Exp $";
#endif
#endif /* not lint */
@@ -116,7 +116,7 @@ extract(char **argv)
cf.wname = file;
copy_ar(&cf, chdr.size);
- if (fchmod(tfd, (short)chdr.mode)) {
+ if (fchmod(tfd, (mode_t)chdr.mode)) {
warn("chmod: %s", file);
eval = 1;
}