Removing the NT_STATUS_HAVE_NO_MEMORY_AND_FREE macro

Garming Sam garming at catalyst.net.nz
Sun Feb 16 14:08:27 MST 2014


On 13/02/14 18:27, Garming Sam wrote:
> Hi,
>
> Included are some patches to remove the 
> NT_STATUS_HAVE_NO_MEMORY_AND_FREE macro.
>
> I'm told that the we shouldn't be using such macros anymore and so I 
> thought I might try and get rid of them. When I was going through the 
> code earlier, I came across this one which is especially terrible 
> since it doesn't have any mention of even a return.
>
> There's a few others that we should get rid of. I do note that 
> NT_STATUS_HAVE_NO_MEMORY has something like 1000 instances. I could 
> obviously remove them, but they're going to have to be checked and 
> it's probably going to be a nuisance to someone.
>
> The first patch I just ran the code through a script. There were only 
> a few left, so in the second patch I fixed the remaining ones manually.
>
>
> Cheers,
>
>
> Garming Sam

Here's a few more removed. You'll notice that these ones were hardly 
used at all in the code.

Anyways, thanks Jeremy.


Cheers,

Garming Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-NT_STATUS_IS_OK_RETURN-macro-from-the-codebas.patch
Type: text/x-patch
Size: 1618 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140217/b49fb6a3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Remove-NT_STATUS_IS_ERR_RETURN-macro-from-the-codeba.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140217/b49fb6a3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Remove-NT_STATUS_NOT_ERR_RETURN-macro.patch
Type: text/x-patch
Size: 1036 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140217/b49fb6a3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Remove-all-uses-of-the-NT_STATUS_NOT_OK_RETURN_AND_F.patch
Type: text/x-patch
Size: 5352 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140217/b49fb6a3/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Complete-the-removal-of-the-NT_STATUS_NOT_OK_RETURN_.patch
Type: text/x-patch
Size: 1148 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140217/b49fb6a3/attachment-0004.bin>


More information about the samba-technical mailing list