mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 3608003 - 'lib/ipmi_fru.c' - atol() should be replaced with str2*()
Commit replaces atol() calls with str2int() ones in 'lib/ipmi_fru.c'.
This commit is contained in:
parent
dbe514a558
commit
8489426a63
@ -3558,8 +3558,16 @@ ipmi_fru_edit_multirec(struct ipmi_intf * intf, uint8_t id ,
|
|||||||
lprintf(LOG_ERR, "oem iana <record> <format> [<args>]");
|
lprintf(LOG_ERR, "oem iana <record> <format> [<args>]");
|
||||||
error = 1;
|
error = 1;
|
||||||
} else {
|
} else {
|
||||||
suppliedIana = atol ( argv[3] ) ;
|
if (str2uint(argv[3], &suppliedIana) == 0) {
|
||||||
lprintf(LOG_DEBUG, "using iana: %d", suppliedIana);
|
lprintf(LOG_DEBUG,
|
||||||
|
"using iana: %d",
|
||||||
|
suppliedIana);
|
||||||
|
} else {
|
||||||
|
lprintf(LOG_ERR,
|
||||||
|
"Given IANA '%s' is invalid.",
|
||||||
|
argv[3]);
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3746,8 +3754,16 @@ ipmi_fru_get_multirec(struct ipmi_intf * intf, uint8_t id ,
|
|||||||
lprintf(LOG_ERR, "oem iana <record> <format>");
|
lprintf(LOG_ERR, "oem iana <record> <format>");
|
||||||
error = 1;
|
error = 1;
|
||||||
} else {
|
} else {
|
||||||
suppliedIana = atol ( argv[3] ) ;
|
if (str2uint(argv[3], &suppliedIana) == 0) {
|
||||||
lprintf(LOG_DEBUG, "using iana: %d", suppliedIana);
|
lprintf(LOG_DEBUG,
|
||||||
|
"using iana: %d",
|
||||||
|
suppliedIana);
|
||||||
|
} else {
|
||||||
|
lprintf(LOG_ERR,
|
||||||
|
"Given IANA '%s' is invalid.",
|
||||||
|
argv[3]);
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user