21 Jul
2014
21 Jul
'14
9:08 a.m.
This fixes a always false comparison that a unsigned int can never be below zero. This was found when compiling with clang. Signed-off-by: Anton Lundin <glance@acc.umu.se> --- src/ihex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ihex.c b/src/ihex.c index 69df787..46b4b81 100644 --- a/src/ihex.c +++ b/src/ihex.c @@ -142,7 +142,7 @@ dc_ihex_file_read (dc_ihex_file_t *file, dc_ihex_entry_t *entry) /* Get the record type. */ type = data[3]; - if (type < 0 || type > 5) { + if (type > 5) { ERROR (file->context, "Invalid record type (0x%02x).", type); return DC_STATUS_DATAFORMAT; } -- 1.9.1