sctp: fix compile warnings in sctp_tsnmap_num_gabs
authorShan Wei <shanwei@cn.fujitsu.com>
Sat, 19 Feb 2011 21:57:26 +0000 (21:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Feb 2011 19:10:15 +0000 (11:10 -0800)
net/sctp/tsnmap.c: In function ‘sctp_tsnmap_num_gabs’:
net/sctp/tsnmap.c:347: warning: ‘start’ may be used uninitialized in this function
net/sctp/tsnmap.c:347: warning: ‘end’ may be used uninitialized in this function

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/tsnmap.c

index 747d5412c463ee1492f37485bb7bf4e4181e1b4e..f1e40cebc981ae7962bb9cd20ae84823b70d43cf 100644 (file)
@@ -344,7 +344,7 @@ __u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map,
 
        /* Refresh the gap ack information. */
        if (sctp_tsnmap_has_gap(map)) {
-               __u16 start, end;
+               __u16 start = 0, end = 0;
                sctp_tsnmap_iter_init(map, &iter);
                while (sctp_tsnmap_next_gap_ack(map, &iter,
                                                &start,