]> git.cameronkatri.com Git - bsd-progress.git/commitdiff
Fix argument handling of the "-b" option on 64bit platforms. Using
authortron <tron@NetBSD.org>
Sat, 17 Jul 2010 10:51:03 +0000 (10:51 +0000)
committertron <tron@NetBSD.org>
Sat, 17 Jul 2010 10:51:03 +0000 (10:51 +0000)
"-b 1024k" would previously fail with this error message:

progress: buffer size 1048576 is greater than -1.

progress.c

index 826d240dda2f4f688514e7f56cacdf62ecc8ba1f..893e89cd0423dd373b7f0b5d40fa972017f9982c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: progress.c,v 1.17 2008/05/26 04:53:11 dholland Exp $ */
+/*     $NetBSD: progress.c,v 1.18 2010/07/17 10:51:03 tron Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.17 2008/05/26 04:53:11 dholland Exp $");
+__RCSID("$NetBSD: progress.c,v 1.18 2010/07/17 10:51:03 tron Exp $");
 #endif                         /* not lint */
 
 #include <sys/types.h>
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
                switch (ch) {
                case 'b':
                        buffersize = (size_t) strsuftoll("buffer size", optarg,
-                           0, SIZE_T_MAX);
+                           0, SSIZE_MAX);
                        break;
                case 'e':
                        eflag++;