*: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -311,7 +311,7 @@ static void init(const char *cfg_filename)
|
||||
parser_t *parser = config_open2(cfg_filename, xfopen_stdin);
|
||||
while (config_read(parser, token, 2, 2, "#=",
|
||||
(PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) {
|
||||
unsigned val = xatoi_u(token[1]);
|
||||
unsigned val = xatoi_positive(token[1]);
|
||||
int i = index_in_strings(param_names, token[0]);
|
||||
if (i < 0)
|
||||
bb_error_msg_and_die("syntax error: %s", token[0]);
|
||||
|
@@ -2055,8 +2055,8 @@ int hdparm_main(int argc, char **argv)
|
||||
#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
|
||||
if (c == 'R') {
|
||||
scan_hwif = parse_opts_0_INTMAX(&hwif_data);
|
||||
hwif_ctrl = xatoi_u((argv[optind]) ? argv[optind] : "");
|
||||
hwif_irq = xatoi_u((argv[optind+1]) ? argv[optind+1] : "");
|
||||
hwif_ctrl = xatoi_positive((argv[optind]) ? argv[optind] : "");
|
||||
hwif_irq = xatoi_positive((argv[optind+1]) ? argv[optind+1] : "");
|
||||
/* Move past the 2 additional arguments */
|
||||
argv += 2;
|
||||
argc -= 2;
|
||||
|
@@ -73,7 +73,7 @@ int ionice_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
if (!(opt & (OPT_n|OPT_c))) {
|
||||
if (!(opt & OPT_p) && *argv)
|
||||
pid = xatoi_u(*argv);
|
||||
pid = xatoi_positive(*argv);
|
||||
|
||||
pri = ioprio_get(IOPRIO_WHO_PROCESS, pid);
|
||||
if (pri == -1)
|
||||
|
@@ -36,10 +36,10 @@ int makedevs_main(int argc, char **argv)
|
||||
basedev = argv[1];
|
||||
buf = xasprintf("%s%u", argv[1], (unsigned)-1);
|
||||
type = argv[2];
|
||||
Smajor = xatoi_u(argv[3]);
|
||||
Sminor = xatoi_u(argv[4]);
|
||||
S = xatoi_u(argv[5]);
|
||||
E = xatoi_u(argv[6]);
|
||||
Smajor = xatoi_positive(argv[3]);
|
||||
Sminor = xatoi_positive(argv[4]);
|
||||
S = xatoi_positive(argv[5]);
|
||||
E = xatoi_positive(argv[6]);
|
||||
nodname = argv[7] ? basedev : buf;
|
||||
|
||||
mode = 0660;
|
||||
|
@@ -106,7 +106,7 @@ int mt_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
op.mt_op = opcode_value[idx];
|
||||
if (argv[2])
|
||||
op.mt_count = xatoi_u(argv[2]);
|
||||
op.mt_count = xatoi_positive(argv[2]);
|
||||
else
|
||||
op.mt_count = 1; /* One, not zero, right? */
|
||||
|
||||
|
@@ -53,7 +53,7 @@ int rfkill_main(int argc UNUSED_PARAM, char **argv)
|
||||
rf_name = "uwb";
|
||||
rf_type = index_in_strings(rfkill_types, rf_name);
|
||||
if (rf_type < 0) {
|
||||
rf_idx = xatoi_u(rf_name);
|
||||
rf_idx = xatoi_positive(rf_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user