From c71d258024afd03b96381e258802b474e2c8f708 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 1 May 2014 14:14:50 -0700 Subject: [PATCH] Fix Uemis SDA download Stupid typo in commit e1a1c218 broke the Uemis download. Signed-off-by: Dirk Hohndel --- uemis-downloader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uemis-downloader.c b/uemis-downloader.c index 66deffa46..3bb93703b 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -37,6 +37,10 @@ #define UEMIS_MAX_TIMEOUT 2000000 /* 2s */ #endif +#ifdef UEMIS_DEBUG +#define debugfile stderr +#endif + static char *param_buff[NUM_PARAM_BUFS]; static char *reqtxt_path; static int reqtxt_file; @@ -503,7 +507,7 @@ static bool uemis_get_answer(const char *path, char *request, int n_param_in, if (lseek(ans_file, 3, SEEK_CUR) == -1) goto fs_error; buf = malloc(size - 2); - if ((r = read(ans_file, buf, size - 3) != size - 3)) { + if ((r = read(ans_file, buf, size - 3)) != size - 3) { free(buf); goto fs_error; }