use strtok instead of strsep because its ANSI-C portable

This commit is contained in:
Duncan Laurie 2004-09-10 18:58:40 +00:00
parent acc6c80b2d
commit 7ad880076e

View File

@ -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])