From 0400e23d30bd8b321e2904b89ca8a1980242f7a7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 14 Jun 2021 13:42:25 +0200 Subject: [PATCH] uninitialized: set *status on all returns out of e2_ssend() --- backend/epson2-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/epson2-io.c b/backend/epson2-io.c index 9d23e2ab1..293a82589 100644 --- a/backend/epson2-io.c +++ b/backend/epson2-io.c @@ -77,7 +77,8 @@ e2_send(Epson_Scanner * s, void *buf, size_t buf_size, size_t reply_len, if (reply_len == 0) { DBG(0, "Cannot send this command to a networked scanner\n"); - return SANE_STATUS_INVAL; + *status = SANE_STATUS_INVAL; + return 0; /* nothing actually sent */ } return sanei_epson_net_write(s, 0x2000, buf, buf_size, reply_len, status);