#include <mit-copyright.h>
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
return(MR_NO_MEM);
}
count = 0;
- for (p = start = config_buf; *p; p++) {
- if (*p != '\n')
- continue;
- *p++ = '\0';
- config_keys[count++] = start;
- start = p;
- if (!*p) break;
+ for (p = strtok(config_buf, "\n"); p; p = strtok(NULL, "\n")) {
+ config_keys[count++] = p;
}
config_keys[count] = NULL;
for (count = 0; config_keys[count]; count++) {