summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-01-08 04:43:49 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-01-08 04:43:49 +0000
commit24fbda6c2d2013938c9220ceedbc3b7b6a8bc7e0 (patch)
tree9340fbac30c80e44317a8b6b2e2c6da7bacf934e /bin
parentb2cf63444bf7627717dbcde16bbe34983a149d40 (diff)
Use size_t where appropriate
ok fgsch@
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/ar_subs.c6
-rw-r--r--bin/pax/tables.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
index 11f437ebf65..144b90ad37c 100644
--- a/bin/pax/ar_subs.c
+++ b/bin/pax/ar_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar_subs.c,v 1.34 2012/12/04 02:24:45 deraadt Exp $ */
+/* $OpenBSD: ar_subs.c,v 1.35 2014/01/08 04:43:48 guenther Exp $ */
/* $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $ */
/*-
@@ -751,8 +751,8 @@ copy(void)
int res;
int fddest;
char *dest_pt;
- int dlen;
- int drem;
+ size_t dlen;
+ size_t drem;
int fdsrc = -1;
struct stat sb;
ARCHD archd;
diff --git a/bin/pax/tables.c b/bin/pax/tables.c
index cfbf4a55c30..3b10bd92d49 100644
--- a/bin/pax/tables.c
+++ b/bin/pax/tables.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tables.c,v 1.27 2012/12/04 02:24:45 deraadt Exp $ */
+/* $OpenBSD: tables.c,v 1.28 2014/01/08 04:43:48 guenther Exp $ */
/* $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $ */
/*-
@@ -70,7 +70,7 @@ static DEVT **dtab = NULL; /* device/inode mapping tables */
static ATDIR **atab = NULL; /* file tree directory time reset table */
static DIRDATA *dirp = NULL; /* storage for setting created dir time/mode */
static size_t dirsize; /* size of dirp table */
-static long dircnt = 0; /* entries in dir time/mode storage */
+static size_t dircnt = 0; /* entries in dir time/mode storage */
static int ffd = -1; /* tmp file for file time table name storage */
static DEVT *chk_dev(dev_t, int);
@@ -1163,7 +1163,7 @@ void
proc_dir(void)
{
DIRDATA *dblk;
- long cnt;
+ size_t cnt;
if (dirp == NULL)
return;
@@ -1171,7 +1171,7 @@ proc_dir(void)
* read backwards through the file and process each directory
*/
cnt = dircnt;
- while (--cnt >= 0) {
+ while (cnt-- > 0) {
/*
* frc_mode set, make sure we set the file modes even if
* the user didn't ask for it (see file_subs.c for more info)