libftdi-git Archives

Subject: port libftdi to libusb-1.0 branch, master, updated. v0.17-197-g23fc2fe

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 21 Jun 2011 09:48:59 +0200 (CEST)
The branch, master has been updated
       via  23fc2fe3703ce3e01a2b15293e385fbec515a37a (commit)
      from  3a2847493a8f21b6400868a34ce56b1efd2fa690 (commit)


- Log -----------------------------------------------------------------
commit 23fc2fe3703ce3e01a2b15293e385fbec515a37a
Author: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Mon Jun 20 14:50:16 2011 +0200

    Remove some code duplication

-----------------------------------------------------------------------

Summary of changes:
 examples/eeprom.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/examples/eeprom.c b/examples/eeprom.c
index e2c8052..8d74d2c 100644
--- a/examples/eeprom.c
+++ b/examples/eeprom.c
@@ -177,23 +177,13 @@ int main(int argc, char **argv)
                     f, ftdi_get_error_string(ftdi));
             exit(-1);
         }
-        f = ftdi_read_eeprom(ftdi);
-        if (f < 0)
-        {
-            fprintf(stderr, "ftdi_read_eeprom: %d (%s)\n",
-                    f, ftdi_get_error_string(ftdi));
-            exit(-1);
-        }
     }
-    else
+    f = ftdi_read_eeprom(ftdi);
+    if (f < 0)
     {
-        f = ftdi_read_eeprom(ftdi);
-        if (f < 0)
-        {
-            fprintf(stderr, "ftdi_read_eeprom: %d (%s)\n",
-                    f, ftdi_get_error_string(ftdi));
-            exit(-1);
-        }
+        fprintf(stderr, "ftdi_read_eeprom: %d (%s)\n",
+                f, ftdi_get_error_string(ftdi));
+        exit(-1);
     }
 
 


hooks/post-receive
-- 
port libftdi to libusb-1.0

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • port libftdi to libusb-1.0 branch, master, updated. v0.17-197-g23fc2fe, libftdi-git <=