kernel: Fix two cases of sizeof(sizeof(x)).
authorSascha Wildner <saw@online.de>
Sun, 4 Dec 2011 17:08:16 +0000 (18:08 +0100)
committerSascha Wildner <saw@online.de>
Sun, 4 Dec 2011 17:08:16 +0000 (18:08 +0100)
sys/netinet/sctp_indata.c
sys/netinet/sctp_usrreq.c

index f742669..077413b 100644 (file)
@@ -3821,7 +3821,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
        /* always set this up to cum-ack */
        asoc->this_sack_highest_gap = last_tsn;
 
-       if (((num_seg * sizeof (sizeof(struct sctp_gap_ack_block))) + sizeof(struct sctp_sack_chunk)) > sack_length) {
+       if (((num_seg * sizeof(struct sctp_gap_ack_block)) + sizeof(struct sctp_sack_chunk)) > sack_length) {
                /* skip corrupt segments */
                strike_enabled = 0;
                goto skip_segments;
index ea93f8e..ecd3a44 100644 (file)
@@ -1240,7 +1240,7 @@ sctp_fill_up_addresses(struct sctp_inpcb *inp,
                                                in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)sas);
                                                ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport;
                                                sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in6));
-                                               actual += sizeof(sizeof(struct sockaddr_in6));
+                                               actual += sizeof(struct sockaddr_in6);
                                        } else {
                                                memcpy(sas, sin, sizeof(*sin));
                                                ((struct sockaddr_in *)sas)->sin_port = inp->sctp_lport;