[asterisk-dev] [Code Review] rfc4235 - Section 4.1: Versions MUST be representable using a non-negative 32 bit integer.

Kevin Fleming reviewboard at asterisk.org
Thu Jan 26 07:32:33 CST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1694/#review5302
-----------------------------------------------------------

Ship it!


Using '%u' and a fixed 32-bit unsigned type should be fine.

- Kevin


On Jan. 26, 2012, 3:22 a.m., Alec Davis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1694/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2012, 3:22 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> printf %d may print negative version numbers, if a subscription exists for long enough.
> 
> I'm not confortable with %u on 32 or 64 bit systems.
> 
> Should I perhaps use a type cast, printf("%lu\n", (unsigned long)dialogver);
> 
> 
> Diffs
> -----
> 
>   trunk/channels/chan_sip.c 350022 
>   trunk/channels/sip/include/sip.h 350022 
> 
> Diff: https://reviewboard.asterisk.org/r/1694/diff
> 
> 
> Testing
> -------
> 
> Compiles
> 
> 
> Thanks,
> 
> Alec
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120126/9f6b5edc/attachment.htm>


More information about the asterisk-dev mailing list