diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 12:49:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 12:49:22 +0000 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /debianutils | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) | |
download | busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2 busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip |
attempt to regularize atoi mess.
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/run_parts.c | 44 | ||||
-rw-r--r-- | debianutils/start_stop_daemon.c | 2 |
2 files changed, 23 insertions, 23 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 964a221a8..f2d90b64d 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -60,31 +60,31 @@ int run_parts_main(int argc, char **argv) | |||
60 | 60 | ||
61 | umask(022); | 61 | umask(022); |
62 | 62 | ||
63 | while ((opt = getopt_long (argc, argv, "tu:a:", | 63 | while ((opt = getopt_long(argc, argv, "tu:a:", |
64 | runparts_long_options, NULL)) > 0) | 64 | runparts_long_options, NULL)) > 0) |
65 | { | 65 | { |
66 | switch (opt) { | 66 | switch (opt) { |
67 | /* Enable test mode */ | 67 | /* Enable test mode */ |
68 | case 't': | 68 | case 't': |
69 | test_mode++; | 69 | test_mode++; |
70 | break; | 70 | break; |
71 | /* Set the umask of the programs executed */ | 71 | /* Set the umask of the programs executed */ |
72 | case 'u': | 72 | case 'u': |
73 | /* Check and set the umask of the program executed. As stated in the original | 73 | /* Check and set the umask of the program executed. As stated in the original |
74 | * run-parts, the octal conversion in libc is not foolproof; it will take the | 74 | * run-parts, the octal conversion in libc is not foolproof; it will take the |
75 | * 8 and 9 digits under some circumstances. We'll just have to live with it. | 75 | * 8 and 9 digits under some circumstances. We'll just have to live with it. |
76 | */ | 76 | */ |
77 | umask(bb_xgetlarg(optarg, 8, 0, 07777)); | 77 | umask(xstrtoul_range(optarg, 8, 0, 07777)); |
78 | break; | 78 | break; |
79 | /* Pass an argument to the programs */ | 79 | /* Pass an argument to the programs */ |
80 | case 'a': | 80 | case 'a': |
81 | /* Add an argument to the commands that we will call. | 81 | /* Add an argument to the commands that we will call. |
82 | * Called once for every argument. */ | 82 | * Called once for every argument. */ |
83 | args = xrealloc(args, (argcount + 2) * (sizeof(char *))); | 83 | args = xrealloc(args, (argcount + 2) * (sizeof(char *))); |
84 | args[argcount++] = optarg; | 84 | args[argcount++] = optarg; |
85 | break; | 85 | break; |
86 | default: | 86 | default: |
87 | bb_show_usage(); | 87 | bb_show_usage(); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 57f42d8ef..6ced9caad 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -260,7 +260,7 @@ int start_stop_daemon_main(int argc, char **argv) | |||
260 | 260 | ||
261 | // USE_FEATURE_START_STOP_DAEMON_FANCY( | 261 | // USE_FEATURE_START_STOP_DAEMON_FANCY( |
262 | // if (retry_arg) | 262 | // if (retry_arg) |
263 | // retries = bb_xgetlarg(retry_arg, 10, 0, INT_MAX); | 263 | // retries = xatoi_u(retry_arg); |
264 | // ) | 264 | // ) |
265 | argc -= optind; | 265 | argc -= optind; |
266 | argv += optind; | 266 | argv += optind; |