Code

options: remove misleading MAX_LONGOPT_LENGTH
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 3 Sep 2011 22:43:06 +0000 (00:43 +0200)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Fri, 16 Sep 2011 19:52:03 +0000 (21:52 +0200)
src/options.c

index 398a0688f11a0feca4135507be7f23b107dacb05..aade81cfc1f79130de6da8d33066648bfa78f9c9 100644 (file)
@@ -30,8 +30,6 @@
 #include <string.h>
 #include <glib.h>
 
-#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