On Wed, Aug 29, 2007 at 04:07:36PM -0000, SVN commits to the Asterisk project 
wrote:
> Author: file
> Date: Wed Aug 29 11:07:35 2007
> New Revision: 81345
> 
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=81345
> Log:
> This concludes bringing trunk back to a working state.
> 
> Modified:
>     trunk/main/event.c
> 
> Modified: trunk/main/event.c
> URL: 
> http://svn.digium.com/view/asterisk/trunk/main/event.c?view=diff&rev=81345&r1=81344&r2=81345
> ==============================================================================
> --- trunk/main/event.c (original)
> +++ trunk/main/event.c Wed Aug 29 11:07:35 2007
> @@ -427,6 +427,7 @@
>       while ((((void *) ie) - ((void *) event)) < event_len) {
>               if (ie->ie_type == ie_type)
>                       return ie->ie_payload;
> +             ie = ((void *) ie) + sizeof(*ie) + ntohs(ie->ie_payload_len);

As far as i remember pointer arithmetic on "void *" is a gnu
extension not guaranteed to work on all compilers.
You should use char * to be standard compliant (even better,
something like a NEXT_IE(x) macro that takes care of the
conversion throughout the file.

On passing i also wonder about the following:

- ast_event and ast_event_ie have exactly the same
  structure, so is there a reason to use two definitions ?

cheers
luigi

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to