Samba 4 libnet_join and RPC-JOIN torture test

Andrew Bartlett abartlet at samba.org
Tue Sep 13 05:40:58 GMT 2005


On Tue, 2005-09-13 at 07:36 +0200, Stefan (metze) Metzmacher wrote:
 
> str = talloc_asprintf(tmp_ctx,"Hello World");
> NT_STATUS_NO_MEMORY_TMPMEM(str, tmp_ctx);
> 
> status = libnet_foo(ctx, tmp_ctx, &r);
> NT_STATUS_NOT_OK_RETURN_TMPMEM(status, tmp_ctx);
> 
> abartlet: would you be happy with this?
> (if so I'll add the macros)

Frankly, macros that 'return' inside them scare me, and put off code
analysers.

Personally, I would simply prefer the spelled out:

if (failcon) {
	talloc_free(tmp_ctx);
	return failed;
}

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Samba Developer, SuSE Labs, Novell Inc.        http://suse.de
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- 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/20050913/bc7ce6bb/attachment.bin


More information about the samba-technical mailing list