OSDN Git Service

maint: function returning "int", did not return a value.
authorJim Meyering <meyering@redhat.com>
Tue, 29 Sep 2009 20:02:56 +0000 (22:02 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 1 Oct 2009 10:04:31 +0000 (12:04 +0200)
* parted/ui.c (init_readline): Return a value (always 0 for now).
* parted/parted.c (_init): Handle init_readline's return value.

parted/parted.c
parted/ui.c

index 55627bf..0dd11d2 100644 (file)
@@ -2461,7 +2461,8 @@ if (!_parse_options (argc_ptr, argv_ptr))
         goto error_done_commands;
 
 if (!opt_script_mode)
-        init_readline ();
+        if (init_readline ())
+                goto error_done_commands;
 
 #ifdef HAVE_GETUID
         if (getuid() != 0 && !opt_script_mode) {
index 1fa10b7..295edba 100644 (file)
@@ -1402,6 +1402,7 @@ init_readline (void)
     readline_state.in_readline = 0;
   }
 #endif
+  return 0;
 }
 
 int