Re: [PATCH] net: sctp: Move sequence start handling into sctp_transport_get_idx()
From: Marcelo Ricardo Leitner
Date: Fri Jan 15 2016 - 14:05:43 EST
On Fri, Jan 15, 2016 at 02:44:31PM +0100, Geert Uytterhoeven wrote:
> net/sctp/proc.c: In function âsctp_transport_get_idxâ:
> net/sctp/proc.c:313: warning: âobjâ may be used uninitialized in this function
>
> This is currently a false positive, as all callers check for a zero
> offset first, and handle this case in the exact same way.
>
> Move the check and handling into sctp_transport_get_idx() to kill the
> compiler warning, and avoid future bugs.
>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> ---
> Compile-tested only.
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>