pki: Print a warning if MAX_COMMANDS is too low

This commit is contained in:
Tobias Brunner
2014-01-23 10:10:53 +01:00
parent b0e14fcba6
commit 2b8224fce3
+7
View File
@@ -140,6 +140,13 @@ void command_register(command_t command)
{
int i;
if (registered == MAX_COMMANDS)
{
fprintf(stderr, "unable to register command, please increase "
"MAX_COMMANDS\n");
return;
}
cmds[registered] = command;
/* append default options, but not to --help */
if (!active)