net.c: always initialize bytes_read

In CID 1459612, Coverity scan has complained about uninitialized use
of the variable bytes_read. Although this is a false positive here,
it seems to be more safe to always initialize bytes_read.
This commit is contained in:
Olaf Bergmann committed 2017-11-03 13:54:07 +01:00
1 parent 313a655a9a
commit 027d9601eb
1 file changed
+1 -1
+1 -1
View File
@@ -1099,7 +1099,7 @@ coap_read_session(coap_context_t *ctx, coap_session_t *session, coap_tick_t now)
coap_handle_dgram_for_proto(ctx, session, packet);
}
} else {
ssize_t bytes_read;
ssize_t bytes_read = 0;
const uint8_t *p;
int retry;
/* adjust for LWIP */