Skip to contentSkip to conversation

sctp: fix compile warnings in sctp_tsnmap_num_gabs

PATCH Applied Shan Wei 2 participants 2 messages Feb 20, 2011

Subsystems (3)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 sctp: fix compile warnings in sctp_tsnmap_num_gabs

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

---
 net/sctp/tsnmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sctp/tsnmap.c +1 -1
index 747d541..f1e40ce 100644
@@ -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,
Signature · 1 line
1.6.3.3
maintainer Applied
#1 lore raw

From: Shan Wei <[email protected]>
Date: Sun, 20 Feb 2011 15:57:26 +0800

Quoted 5 lines

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

Applied.