diff options
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/pchg_fuzz.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fuzz/pchg_fuzz.c b/fuzz/pchg_fuzz.c index 97dbca74c4..eced90bb5e 100644 --- a/fuzz/pchg_fuzz.c +++ b/fuzz/pchg_fuzz.c @@ -40,15 +40,15 @@ static pthread_cond_t done_cond; static pthread_mutex_t lock; #define MAX_MESSAGES 8 -#define MAX_MESSAGE_SIZE (sizeof(struct ctn730_msg) \ - + member_size(struct ctn730_msg, length) * 256) +#define MAX_MESSAGE_SIZE \ + (sizeof(struct ctn730_msg) + \ + member_size(struct ctn730_msg, length) * 256) static uint8_t input[MAX_MESSAGE_SIZE * MAX_MESSAGES]; static uint8_t *head, *tail; static bool data_available; -int pchg_i2c_xfer(int port, uint16_t addr_flags, - const uint8_t *out, int out_size, - uint8_t *in, int in_size, int flags) +int pchg_i2c_xfer(int port, uint16_t addr_flags, const uint8_t *out, + int out_size, uint8_t *in, int in_size, int flags) { if (port != I2C_PORT_WLC || addr_flags != CTN730_I2C_ADDR) return EC_ERROR_INVAL; @@ -92,7 +92,6 @@ void irq_task(int argc, char **argv) pthread_cond_signal(&done_cond); pthread_mutex_unlock(&lock); } - } void run_test(int argc, char **argv) |