kernel/relay.c: drop unneeded initialization
PATCH 1/1 kernel/relay.c: drop unneeded initialization
The variable 'consumed' is initialized with the consumed count but immediately after that the consumed count is updated and assigned to 'consumed' again thus overwriting the previous value.
So, drop the unneeded initialization.
Signed-off-by Sudip Mukherjee <[email protected]>
---
The resultant binary stayed same after this change. Verified with md5sum which remained same with and without this change.
$ md5sum kernel/relay.o 20854215a46e241520576a5d3c523073 kernel/relay.o
kernel/relay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/relay.c +1 -1
@@ -1002,7 +1002,7 @@ static int relay_file_read_avail(struct rchan_buf *buf)size_t subbuf_size = buf->chan->subbuf_size;size_t n_subbufs = buf->chan->n_subbufs;size_t produced = buf->subbufs_produced; -size_t consumed = buf->subbufs_consumed; +size_t consumed;relay_file_read_consume (buf,0 ,0 );
Signature · 1 line
2.11.0