char *ptr; //!< pointer into read buffer
char *token; //!< current token that we parsed
- int token_len; //!< length of the token
+ size_t token_len; //!< length of the token
char string[256]; //!< double quoted strings go here, so we don't mangle the input buffer
} rlm_isc_dhcp_tokenizer_t;
if (*p != *q) {
fail:
fr_strerror_printf("Expected '%.*s', got unknown text '%.*s'",
- state->token_len, state->token,
+ (int)state->token_len, state->token,
(int) (next - cmd), cmd);
return -1;
}
TYPE_CHECK("text", FR_TYPE_STRING);
TYPE_CHECK("string", FR_TYPE_OCTETS);
- fr_strerror_printf("unknown type '%.*s'", state->token_len, state->token);
+ fr_strerror_printf("unknown type '%.*s'", (int)state->token_len, state->token);
return FR_TYPE_NULL;
}
if (ret <= 0) goto error_ret;
if ((state->token_len != 1) || (state->token[0] != '=')) {
- fr_strerror_printf("expected '=' after code definition got '%.*s'", state->token_len, state->token);
+ fr_strerror_printf("expected '=' after code definition got '%.*s'", (int)state->token_len, state->token);
goto error;
}
if (! ((state->token_len == 2) && (memcmp(state->token, "of", 2) == 0))) {
fr_strerror_printf("expected 'array of', not 'array %.*s'",
- state->token_len, state->token);
+ (int)state->token_len, state->token);
goto error;
}
fr_pair_append(&parent->options, vp);
// @todo - print out ISC names...
- IDEBUG("%.*s option %s %.*ss ", state->braces, spaces, da->name, state->token_len, state->token);
+ IDEBUG("%.*s option %s %.*ss ", state->braces, spaces, da->name, (int)state->token_len, state->token);
}
/*
*/
if (!q) {
unknown:
- fr_strerror_printf("unknown command '%.*s'", state->token_len, state->token);
+ fr_strerror_printf("unknown command '%.*s'", (int)state->token_len, state->token);
return -1;
}
if (state->inst->pedantic && !tokens[half].parse) {
if (tokens[half].type == ISC_INVALID) {
ERROR("Command '%.*s' is not supported.",
- state->token_len, state->token);
+ (int)state->token_len, state->token);
return -1;
}
if (DEBUG_ENABLED) {
if (tokens[half].type == ISC_NOOP) {
WARN("Command '%.*s' is not yet implemented.",
- state->token_len, state->token);
+ (int)state->token_len, state->token);
}
if (tokens[half].type == ISC_IGNORE) {
WARN("Ignoring command '%.*s'. It is not relevant.",
- state->token_len, state->token);
+ (int)state->token_len, state->token);
}
}
}
semicolon = YES_SEMICOLON; /* default to always requiring this */
- DDEBUG("... TOKEN %.*s ", state->token_len, state->token);
+ DDEBUG("... TOKEN %.*s ", (int)state->token_len, state->token);
info = talloc_zero(parent, rlm_isc_dhcp_info_t);
fr_pair_list_init(&info->options);