[nemiver] Cleanup in main.c
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Cleanup in main.c
- Date: Wed, 13 Oct 2010 19:10:33 +0000 (UTC)
commit 51d90ac4aa2c858e778237d0709829f8782f5bca
Author: Dodji Seketeli <dodji seketeli org>
Date: Sun Oct 3 19:42:09 2010 +0200
Cleanup in main.c
* main (parse_command_line): Use GCharSafePtr.
src/main.cc | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index d57ad31..305a9d0 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -304,15 +304,13 @@ parse_command_line (int& a_argc,
NEMIVER_CATCH;
g_error_free (error);
- gchar *help_message = g_option_context_get_help (context.get (),
- true, NULL);
- NEMIVER_TRY;
- cerr << help_message << std::endl;
- NEMIVER_CATCH;
-
- g_free (help_message);
+ GCharSafePtr help_message;
+ help_message.reset (g_option_context_get_help (context.get (),
+ true, NULL));
+ cerr << help_message.get () << std::endl;
return false;
}
+
if (a_argv != inf_argv) {
memmove (a_argv, inf_argv, inf_argc * sizeof (char*));
a_argc = inf_argc;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]