mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
use strtok instead of strsep because its ANSI-C portable
This commit is contained in:
parent
acc6c80b2d
commit
7ad880076e
@ -129,7 +129,9 @@ int ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
add_history(pbuf);
|
||||
|
||||
__argc = 0;
|
||||
for (ap = __argv; (*ap = strsep(&pbuf, " \t")) != NULL;) {
|
||||
ap = __argv;
|
||||
|
||||
for (*ap = strtok(pbuf, " \t"); *ap != NULL; *ap = strtok(NULL, " \t")) {
|
||||
__argc++;
|
||||
if (**ap != '\0') {
|
||||
if (++ap >= &__argv[20])
|
||||
|
Loading…
x
Reference in New Issue
Block a user