projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f01b805
)
Use bb_xgetlarg
author
Glenn L McGrath
<bug1@ihug.co.nz>
Sun, 27 Apr 2003 10:05:35 +0000
(10:05 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Sun, 27 Apr 2003 10:05:35 +0000
(10:05 -0000)
coreutils/fold.c
patch
|
blob
|
history
diff --git
a/coreutils/fold.c
b/coreutils/fold.c
index f9ae526df55791127a3edd75058ebbe8e325a5fb..df51107553b0e596f3ebbcc40e9cf0f9c6da520a 100644
(file)
--- a/
coreutils/fold.c
+++ b/
coreutils/fold.c
@@
-97,15
+97,7
@@
extern int fold_main(int argc, char **argv)
break_spaces = 1;
break;
case 'w': { /* Line width. */
- long int tmp_long;
- char *end_ptr;
-
- errno = 0;
- tmp_long = strtol(optarg, &end_ptr, 10);
- if (!end_ptr || errno || tmp_long < 1) {
- bb_error_msg_and_die("invalid number of columns: `%s'", optarg);
- }
- width = (int) tmp_long;
+ width = bb_xgetlarg(optarg, 10, 1, 10000);
break;
}
default: