X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_cmds.c;h=1f53ad1d6a4da8bc966d2c67f024a29d2517ddef;hb=db8b1cda4841f45af22d149c6bfc575e79289f75;hp=f6675969fa55d543dccd7a508d6fc82359d504ae;hpb=f5fdf24ccec9318baf11eec25d6dba881dc77332;p=collectd.git diff --git a/src/utils_cmds.c b/src/utils_cmds.c index f6675969..1f53ad1d 100644 --- a/src/utils_cmds.c +++ b/src/utils_cmds.c @@ -49,7 +49,7 @@ static cmd_status_t cmd_split (char *buffer, size_t *ret_len, char ***ret_fields, cmd_error_handler_t *err) { - char *string, *field; + char *field; bool in_field, in_quotes; size_t estimate, len; @@ -57,7 +57,7 @@ static cmd_status_t cmd_split (char *buffer, estimate = 0; in_field = false; - for (string = buffer; *string != '\0'; ++string) + for (char *string = buffer; *string != '\0'; ++string) { /* Make a quick worst-case estimate of the number of fields by * counting spaces and ignoring quotation marks. */ @@ -102,7 +102,7 @@ static cmd_status_t cmd_split (char *buffer, field = NULL; in_field = false; in_quotes = false; - for (string = buffer; *string != '\0'; string++) + for (char *string = buffer; *string != '\0'; string++) { if (isspace ((int)string[0])) {