pki: Make cmds array static, ensuring that it is zero-initialized
As pki --help relies on a zero-terminated array, make the actually non-public cmds array static to ensure initialization.
This commit is contained in:
+1
-2
@@ -29,7 +29,7 @@
|
|||||||
/**
|
/**
|
||||||
* Registered commands.
|
* Registered commands.
|
||||||
*/
|
*/
|
||||||
command_t cmds[MAX_COMMANDS];
|
static command_t cmds[MAX_COMMANDS];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* active command.
|
* active command.
|
||||||
@@ -274,4 +274,3 @@ int command_dispatch(int c, char *v[])
|
|||||||
}
|
}
|
||||||
return command_usage(c > 1 ? "invalid operation" : NULL);
|
return command_usage(c > 1 ? "invalid operation" : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user