From 49c5ac7264ef3e1bed2a4a1e290028eb48b3bf44 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sat, 14 Mar 2009 22:57:11 +0100 Subject: [PATCH] Fix return value of ftdi_eeprom_decode as noted by Jim Paris, thanks. --- src/ftdi.c | 2 +- src/ftdi.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ftdi.c b/src/ftdi.c index f78206a..e7a7274 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -1822,7 +1822,7 @@ int ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output) FIXME: How to pass size? How to handle size field in ftdi_eeprom? FIXME: Strings are malloc'ed here and should be freed somewhere */ -void ftdi_eeprom_decode(struct ftdi_eeprom *eeprom, unsigned char *buf, int size) +int ftdi_eeprom_decode(struct ftdi_eeprom *eeprom, unsigned char *buf, int size) { unsigned char i, j; unsigned short checksum, eeprom_checksum, value; diff --git a/src/ftdi.h b/src/ftdi.h index 3bb8e7a..60cc6a1 100644 --- a/src/ftdi.h +++ b/src/ftdi.h @@ -328,8 +328,8 @@ extern "C" { /* init and build eeprom from ftdi_eeprom structure */ void ftdi_eeprom_initdefaults(struct ftdi_eeprom *eeprom); - int ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output); - void ftdi_eeprom_decode(struct ftdi_eeprom *eeprom, unsigned char *output, int size); + int ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output); + int ftdi_eeprom_decode(struct ftdi_eeprom *eeprom, unsigned char *output, int size); /* "eeprom" needs to be valid 128 byte eeprom (generated by the eeprom generator) the checksum of the eeprom is valided */ -- 1.7.1