Re: [PATCH] kcm: fix variable type

From: David Miller
Date: Fri Mar 11 2016 - 11:44:54 EST


From: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
Date: Fri, 11 Mar 2016 07:51:15 +0100

> Function skb_splice_bits can return negative values, its result should
> be assigned to signed variable to allow correct error checking.
>
> The problem has been detected using patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci.
>
> Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>

Since skb_splice_bits() returns an 'int', that would be a more appropriate
type to use here.

Thank you.