Author: hailfinger
Date: Sat Jun 16 02:11:16 2012
New Revision: 1545
URL: http://flashrom.org/trac/flashrom/changeset/1545

Log:
Remove exit() call from show_id

The only caller is able to check the return code and handle it
correctly.

Signed-off-by: Niklas Söderlund <[email protected]>
Acked-by: Carl-Daniel Hailfinger <[email protected]>

Modified:
   trunk/flashrom.c
   trunk/layout.c

Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c    Sat Jun 16 02:02:27 2012        (r1544)
+++ trunk/flashrom.c    Sat Jun 16 02:11:16 2012        (r1545)
@@ -1787,7 +1787,10 @@
 
 #if CONFIG_INTERNAL == 1
                if (programmer == PROGRAMMER_INTERNAL)
-                       show_id(newcontents, size, force);
+                       if (show_id(newcontents, size, force)) {
+                               ret = 1;
+                               goto out;
+                       }
 #endif
        }
 

Modified: trunk/layout.c
==============================================================================
--- trunk/layout.c      Sat Jun 16 02:02:27 2012        (r1544)
+++ trunk/layout.c      Sat Jun 16 02:11:16 2012        (r1545)
@@ -137,7 +137,7 @@
                                  "\n\n",
                                  mainboard_vendor, mainboard_part, lb_vendor,
                                  lb_part);
-                       exit(1);
+                       return 1;
                }
        }
 

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to