aboutsummaryrefslogtreecommitdiff
path: root/findutils/xargs.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
commit1385899416a4396385ad421ae1f532be7103738a (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /findutils/xargs.c
parent5625415085e68ac5e150f54e685417c866620d76 (diff)
downloadbusybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip
attempt to regularize atoi mess.
Diffstat (limited to 'findutils/xargs.c')
-rw-r--r--findutils/xargs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 81997b6f6..e7cc7c379 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -426,7 +426,7 @@ int xargs_main(int argc, char **argv)
426 orig_arg_max -= 2048; /* POSIX.2 requires subtracting 2048 */ 426 orig_arg_max -= 2048; /* POSIX.2 requires subtracting 2048 */
427 427
428 if (opt & OPT_UPTO_SIZE) { 428 if (opt & OPT_UPTO_SIZE) {
429 n_max_chars = bb_xgetularg10_bnd(max_chars, 1, orig_arg_max); 429 n_max_chars = xatoul_range(max_chars, 1, orig_arg_max);
430 for (i = 0; i < argc; i++) { 430 for (i = 0; i < argc; i++) {
431 n_chars += strlen(*argv) + 1; 431 n_chars += strlen(*argv) + 1;
432 } 432 }
@@ -446,7 +446,7 @@ int xargs_main(int argc, char **argv)
446 max_chars = xmalloc(n_max_chars); 446 max_chars = xmalloc(n_max_chars);
447 447
448 if (opt & OPT_UPTO_NUMBER) { 448 if (opt & OPT_UPTO_NUMBER) {
449 n_max_arg = bb_xgetularg10_bnd(max_args, 1, INT_MAX); 449 n_max_arg = xatoul_range(max_args, 1, INT_MAX);
450 } else { 450 } else {
451 n_max_arg = n_max_chars; 451 n_max_arg = n_max_chars;
452 } 452 }