Skip to contentSkip to conversation

relay: fix signedness in subbuf_splice_actor()

PATCH New Martin Peschke 1 participant 1 message Mar 16, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 relay: fix signedness in subbuf_splice_actor()

From: Martin Peschke <[email protected]>

The variable ret is used as a signed value.
Found by a statical code analysis tool.

---
 kernel/relay.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/relay.c +2 -1
@@ -1227,7 +1227,8 @@ static int subbuf_splice_actor(struct fi
 			       unsigned int flags,
 			       int *nonpad_ret)
 {
-	unsigned int pidx, poff, total_len, subbuf_pages, nr_pages, ret;
+	unsigned int pidx, poff, total_len, subbuf_pages, nr_pages;
+	int ret;
 	struct rchan_buf *rbuf = in->private_data;
 	unsigned int subbuf_size = rbuf->chan->subbuf_size;
 	uint64_t pos = (uint64_t) *ppos;