mnc: handle empty input lines

This commit is contained in:
Steve Schnepp 2013-02-08 21:24:44 +01:00
parent 773d5ed4cf
commit 2cdb57aec2
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {
cmd = strtok(line, " \t\n");
arg = strtok(line, " \t\n");
if (strlen(cmd) == 0) {
if (!cmd || strlen(cmd) == 0) {
} else if (strcmp(cmd, "version") == 0) {
printf("munin c node version: %s\n", VERSION);
} else if (strcmp(cmd, "nodes") == 0) {