Use the PARAM_FLAG_STRIP_TRAILING_WS flag wherever possible.

This commit is contained in:
LemonBoy 2015-11-09 23:02:41 +01:00
commit d4676c9855
11 changed files with 33 additions and 25 deletions

View file

@ -108,7 +108,8 @@ static void cmd_set(char *data)
int clear, set_default;
SETTINGS_REC *rec;
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | PARAM_FLAG_OPTIONS,
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST |
PARAM_FLAG_OPTIONS | PARAM_FLAG_STRIP_TRAILING_WS,
"set", &optlist, &key, &value))
return;
@ -182,7 +183,7 @@ static void cmd_toggle(const char *data)
void *free_arg;
int type;
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &key, &value))
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | PARAM_FLAG_STRIP_TRAILING_WS, &key, &value))
return;
if (*key == '\0')