int error = 0;
int status;
- size_t i;
-
if ((fh == NULL) || (buffer == NULL))
return (-1);
return (CMD_UNKNOWN_COMMAND);
}
- for (i = 0; (i == 0) || (i < cmd.cmd.flush.plugins_num); i++)
+ for (size_t i = 0; (i == 0) || (i < cmd.cmd.flush.plugins_num); i++)
{
char *plugin = NULL;
const data_set_t *ds;
value_list_t vl = VALUE_LIST_INIT;
- size_t i;
if ((ret_putval == NULL) || (opts == NULL))
{
/* All the remaining fields are part of the option list. */
result = CMD_OK;
- for (i = 1; i < argc; ++i)
+ for (size_t i = 1; i < argc; ++i)
{
value_list_t *tmp;
void cmd_destroy_putval (cmd_putval_t *putval)
{
- size_t i;
-
if (putval == NULL)
return;
sfree (putval->raw_identifier);
- for (i = 0; i < putval->vl_num; ++i)
+ for (size_t i = 0; i < putval->vl_num; ++i)
{
if (i == 0) /* values is shared between all entries */
sfree (putval->vl[i].values);
{
cmd_error_handler_t err = { cmd_error_fh, fh };
cmd_t cmd;
- size_t i;
int status;
return (CMD_UNKNOWN_COMMAND);
}
- for (i = 0; i < cmd.cmd.putval.vl_num; ++i)
+ for (size_t i = 0; i < cmd.cmd.putval.vl_num; ++i)
plugin_dispatch_values (&cmd.cmd.putval.vl[i]);
if (fh != stdout)
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;
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. */
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]))
{
{
cmd_error_handler_t err = { error_cb, NULL };
int test_result = 0;
- size_t i;
- for (i = 0; i < STATIC_ARRAY_SIZE (parse_data); i++) {
+ for (size_t i = 0; i < STATIC_ARRAY_SIZE (parse_data); i++) {
char *input = strdup (parse_data[i].input);
char description[1024];