From: Jonathan Neuschäfer Date: Sat, 3 Sep 2011 22:43:06 +0000 (+0200) Subject: options: remove misleading MAX_LONGOPT_LENGTH X-Git-Tag: release-0.20~92 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=741be81414987d27c6456e763d8656723845a73a;p=ncmpc.git options: remove misleading MAX_LONGOPT_LENGTH --- diff --git a/src/options.c b/src/options.c index 398a068..aade81c 100644 --- a/src/options.c +++ b/src/options.c @@ -30,8 +30,6 @@ #include #include -#define MAX_LONGOPT_LENGTH 32 - #define ERROR_UNKNOWN_OPTION 0x01 #define ERROR_BAD_ARGUMENT 0x02 #define ERROR_GOT_ARGUMENT 0x03 @@ -139,10 +137,10 @@ display_help(void) printf("Usage: %s [OPTION]...\n", PACKAGE); for (i = 0; i < option_table_size; ++i) { - char tmp[MAX_LONGOPT_LENGTH]; + char tmp[32]; if (option_table[i].argument) - g_snprintf(tmp, MAX_LONGOPT_LENGTH, "%s=%s", + g_snprintf(tmp, sizeof(tmp), "%s=%s", option_table[i].longopt, option_table[i].argument); else