]> Pileus Git - ~andy/linux/blobdiff - net/sctp/tsnmap.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[~andy/linux] / net / sctp / tsnmap.c
index 142ed7ca424d65d7974477745550b80d17c6b742..35c73e82553aeae8f6ab6f282fe17844de9d143a 100644 (file)
@@ -335,10 +335,11 @@ void sctp_tsnmap_renege(struct sctp_tsnmap *map, __u32 tsn)
 }
 
 /* How many gap ack blocks do we have recorded? */
-__u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map)
+__u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map,
+                          struct sctp_gap_ack_block *gabs)
 {
        struct sctp_tsnmap_iter iter;
-       int gabs = 0;
+       int ngaps = 0;
 
        /* Refresh the gap ack information. */
        if (sctp_tsnmap_has_gap(map)) {
@@ -348,14 +349,14 @@ __u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map)
                                                &start,
                                                &end)) {
 
-                       map->gabs[gabs].start = htons(start);
-                       map->gabs[gabs].end = htons(end);
-                       gabs++;
-                       if (gabs >= SCTP_MAX_GABS)
+                       gabs[ngaps].start = htons(start);
+                       gabs[ngaps].end = htons(end);
+                       ngaps++;
+                       if (ngaps >= SCTP_MAX_GABS)
                                break;
                }
        }
-       return gabs;
+       return ngaps;
 }
 
 static int sctp_tsnmap_grow(struct sctp_tsnmap *map, u16 gap)