]> andersk Git - moira.git/blobdiff - update/config.c
Document new blanche exit status semantics. (Don't claim success
[moira.git] / update / config.c
index 85068626624a04115cb02c389f4f9f547dad59dc..99e88cee840e7383a1ff10cdeca2176782c9c969 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <mit-copyright.h>
 #include <stdio.h>
+#include <string.h>
 #include <ctype.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -77,13 +78,8 @@ static init()
        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++) {
This page took 0.03324 seconds and 4 git commands to generate.