Displaying 2 results from an estimated 2 matches for "c5fbc99".
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
..._index);
-        exit (EXIT_FAILURE);
-      }
+      } else
+        error (EXIT_FAILURE, 0,
+               _("unknown long option: %s (%d)"),
+               long_options[option_index].name, option_index);
       break;
 
     case 'F':
diff --git a/p2v/gui.c b/p2v/gui.c
index c5fbc99..625c6eb 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -322,10 +322,8 @@ test_connection_clicked (GtkWidget *w, gpointer data)
   pthread_attr_init (&attr);
   pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
   err = pthread_create (&tid, &attr, test_connection_thread, cop...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...}
+                        config->interfaces[i]) == -1)
+            error (EXIT_FAILURE, errno, "asprintf");
           if (g_file_get_contents (mac_filename, &mac, NULL, NULL)) {
             size_t len = strlen (mac);
 
diff --git a/p2v/gui.c b/p2v/gui.c
index 8835793..c5fbc99 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <error.h>
 #include <locale.h>
 #include <assert.h>
 #include <libintl.h>
@@ -800,24 +801,18 @@ populate_disks (GtkTreeView *disk...