From 81f3fdd854668fc5cd44ad798cda79b015b16ebe Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 11 Dec 2017 22:56:11 +0100 Subject: [PATCH] Fix a mistake in the error checking This is a small bug that was introduced long time ago, with commit 84563c6303a4ab263ea19c973d3f0bbfe6fc0955. --- src/hw_frog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw_frog.c b/src/hw_frog.c index e2bec3b..7953b18 100644 --- a/src/hw_frog.c +++ b/src/hw_frog.c @@ -182,7 +182,7 @@ hw_frog_transfer (hw_frog_device_t *device, // Read the ready byte. unsigned char answer[1] = {0}; status = dc_iostream_read (device->iostream, answer, sizeof (answer), NULL); - if (status != sizeof (answer)) { + if (status != DC_STATUS_SUCCESS) { ERROR (abstract->context, "Failed to receive the ready byte."); return status; }