From 741be81414987d27c6456e763d8656723845a73a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sun, 4 Sep 2011 00:43:06 +0200 Subject: [PATCH] options: remove misleading MAX_LONGOPT_LENGTH --- src/options.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.30.2