Révision 2cdb57ae
mnc: handle empty input lines
| tools/munin-node-c/main.c | ||
|---|---|---|
| 63 | 63 |
cmd = strtok(line, " \t\n"); |
| 64 | 64 |
arg = strtok(line, " \t\n"); |
| 65 | 65 |
|
| 66 |
if (strlen(cmd) == 0) {
|
|
| 66 |
if (!cmd || strlen(cmd) == 0) {
|
|
| 67 | 67 |
} else if (strcmp(cmd, "version") == 0) {
|
| 68 | 68 |
printf("munin c node version: %s\n", VERSION);
|
| 69 | 69 |
} else if (strcmp(cmd, "nodes") == 0) {
|
Formats disponibles : Unified diff