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
|