Rfc6810 bis

pull request for reviewing code
Casting to (void *) is unnecessary, but (void **) is not the same.

------ Original Message ------
Subject: Re: [rtrlib] Rfc6810 bis (#18)
Date: Mon, 08 Sep 2014 08:04:23 -0700
To: rtrlib/rtrlib <rtrlib@noreply.github.com>
From: Nils Bars <notifications@github.com>
>
> In rtrlib/rtr/packets.c:
>
> >              rtr_change_socket_state(rtr_socket, RTR_ERROR_TRANSPORT);
> >              return RTR_ERROR;
> >          }
> >          else if(rtval < 0)
> >              return RTR_ERROR;
> >          type = rtr_get_pdu_type(pdu);
> > -        if(type == IPV4_PREFIX){
> > -            if(rtr_store_prefix_pdu(rtr_socket, pdu, sizeof(pdu_ipv4), (void**) &ipv4_pdus, &ipv4_pdus_nindex, &ipv4_pdus_size) == RTR_ERROR)
> > +        if(type == IPV4_PREFIX) {
> > +            if(rtr_store_prefix_pdu(rtr_socket, pdu, sizeof(struct pdu_ipv4), (void **) &ipv4_pdus, &ipv4_pdus_nindex, &ipv4_pdus_size) == RTR_ERROR)
>
> Should be unnecessary but gcc prints a warning without the cast.
>
> /home/nils/git/rtrlib/./rtrlib/rtr/packets.c:802:16: warning: passing 
> argument 4 of
> ‘rtr_store_prefix_pdu’ from incompatible pointer type
> if(rtr_store_prefix_pdu(rtr_socket, pdu, sizeof(struct pdu_ipv4), 
> &ipv4_pdus, &ipv4_pdus_nindex, &ipv4_pdus_size) == RTR_ERROR)
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/rtrlib/rtrlib/pull/18/files#r17243477>.
>