From 74329a66322f5f72053ca732bca04442fe1bd481 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 31 May 2012 09:22:13 -0400 Subject: [PATCH] argument-related variables can be local --- termite.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/termite.c b/termite.c index f2a6c4f..e6d2ba5 100644 --- a/termite.c +++ b/termite.c @@ -10,13 +10,6 @@ # define __attribute__(x) #endif -static gchar *role = NULL; - -static const GOptionEntry entries[] = { - { "role", 'r', 0, G_OPTION_ARG_STRING, &role, "The role to use", "ROLE" }, - { NULL } -}; - typedef struct search_dialog_info { GtkWidget *vte; GtkWidget *entry; @@ -172,6 +165,13 @@ int main(int argc, char **argv) { GError *error = NULL; GOptionContext *context = g_option_context_new("[COMMAND]"); + const gchar *role = NULL; + + const GOptionEntry entries[] = { + { "role", 'r', 0, G_OPTION_ARG_STRING, &role, "The role to use", "ROLE" }, + { NULL } + }; + g_option_context_add_main_entries(context, entries, NULL); g_option_context_add_group(context, gtk_get_option_group(TRUE));