[asterisk-dev] ast_sockaddr_stringify

Matthew Jordan mjordan at digium.com
Fri Feb 24 08:32:58 CST 2012


----- Original Message -----
> From: "Johann Steinwendtner" <steinwendtner at gmx.net>
> To: "Asterisk Developers Mailing List" <asterisk-dev at lists.digium.com>
> Sent: Friday, February 24, 2012 7:00:44 AM
> Subject: [asterisk-dev] ast_sockaddr_stringify
> 
> Hello !
> 
> Should the output of ast_sockaddr_stringify when passing a NULL
> pointer really be "(null)" ?
> 

Why not?  You've asked the function to turn an address into a string, but
provided a NULL address object or an object that has its memory allocated,
but has 0 length.

In that situation, the fact that it returns anything is at least definable
behavior.

> Thanks.
> 
> Regards
> 
> Hans
> 

Matthew Jordan
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list