talloc_asprintf dumping the length?

Andrew Bartlett abartlet at samba.org
Fri Aug 11 08:40:00 GMT 2006


On Fri, 2006-08-11 at 10:32 +0200, Volker Lendecke wrote:
> On Fri, Aug 11, 2006 at 09:52:28AM +1000, Andrew Bartlett wrote:
> > I find the current talloc_asprintf() convention to be much easier and
> > more natural to code, particularly when used in debug statements.
> 
> If you directly use the result in a debug statement, how do
> you check if the result is != NULL?

I don't.  In Samba4, we assume that printf("%s", NULL) prints "(null)",
which isn't a particularly bad failure mode.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.                  http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20060811/6bb7dd46/attachment.bin


More information about the samba-technical mailing list