Commit a9a42203 authored by Daan Vreeken's avatar Daan Vreeken
Browse files

Explicitly show that an empty argument type string ("") means 'no arguments'.

(You'll see why in the next commit..)

	modified:   controller/controller_load.c
parent 73a5252d
......@@ -442,6 +442,7 @@ int controller_load_check_arg(char **expected_types, int supplied_argc,
char **supplied_types)
{
char **first;
char *str;
bool show_errs;
int ret;
......@@ -476,8 +477,11 @@ int controller_load_check_arg(char **expected_types, int supplied_argc,
"Invalid arguments! This function accepts %sthe following:",
(expected_types[1] != NULL) ? "any of " : "");
expected_types = first;
while (*expected_types != NULL)
log_send(LOG_T_ERROR, "\t%s", *expected_types++);
while (*expected_types != NULL) {
str = *expected_types++;
log_send(LOG_T_ERROR, "\t%s", (*str != '\0') ?
str : "(no arguments)");
}
if (supplied_argc) {
log_send(LOG_T_ERROR, "The given arguments are:");
int i;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment