From: Martin Willi Date: Thu, 20 Feb 2014 10:20:45 +0000 (+0100) Subject: pki: Make cmds array static, ensuring that it is zero-initialized X-Git-Tag: 5.1.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c667bce3fe0209b976ac8e3c3d32ec7a1530e9a;p=thirdparty%2Fstrongswan.git 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. --- diff --git a/src/pki/command.c b/src/pki/command.c index 7ccbd96f4c..b6966ee0b5 100644 --- a/src/pki/command.c +++ b/src/pki/command.c @@ -29,7 +29,7 @@ /** * Registered commands. */ -command_t cmds[MAX_COMMANDS]; +static command_t cmds[MAX_COMMANDS]; /** * active command. @@ -274,4 +274,3 @@ int command_dispatch(int c, char *v[]) } return command_usage(c > 1 ? "invalid operation" : NULL); } -