From c6a18c8f2434fbcfd28800729800d201c2f638a7 Mon Sep 17 00:00:00 2001 From: danw Date: Sun, 2 Feb 1997 21:17:01 +0000 Subject: [PATCH] allow blank lines in moira.conf files, since the documentation says you can. --- update/config.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/update/config.c b/update/config.c index 85068626..99e88cee 100644 --- a/update/config.c +++ b/update/config.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -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++) { -- 2.45.1