mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
mnc: handle empty input lines
This commit is contained in:
parent
773d5ed4cf
commit
2cdb57aec2
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue