[nemiver/remote-cmdline: 7/14] Cleanup in main.c
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver/remote-cmdline: 7/14] Cleanup in main.c
- Date: Mon, 11 Oct 2010 19:06:50 +0000 (UTC)
commit ae3bd74c48bc635cb6271931b2eb59505eec0d26
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]