[gnome-menus] util: Do not call exit() in test tool



commit 6920649082e3c0be363094054eecc9f1185a8185
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jun 8 17:55:43 2011 +0200

    util: Do not call exit() in test tool
    
    A simple return statement is enough.

 util/test-menu-spec.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/util/test-menu-spec.c b/util/test-menu-spec.c
index 3320033..afd4ff4 100644
--- a/util/test-menu-spec.c
+++ b/util/test-menu-spec.c
@@ -22,7 +22,6 @@
 #include "gmenu-tree.h"
 
 #include <string.h>
-#include <stdlib.h>
 
 /* This is only a test program, so we don't need translations. Still keep the
  * infrastructure in place in case we suddenly decide we want to localize this
@@ -232,7 +231,7 @@ main (int argc, char **argv)
   if (!gmenu_tree_load_sync (tree, &error))
     {
       g_printerr ("Failed to load tree: %s\n", error->message);
-      exit (1);
+      return 1;
     }
 
   g_print ("Loaded menu from %s\n", gmenu_tree_get_menu_path (tree));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]