Removing the NT_STATUS_HAVE_NO_MEMORY_AND_FREE macro
Andrew Bartlett
abartlet at samba.org
Sun Feb 16 17:58:19 MST 2014
On Mon, 2014-02-17 at 10:08 +1300, Garming Sam wrote:
> 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.
I've reviewed all of these, and uploaded them with review tags to
https://gerrit.sernet.de/#/q/status:open+project:samba+branch:master
+topic:garming/macro-return,n,z
git://git.samba.org/abartlet/samba.git macro-return
Naturally, I don't propose to push them until Kamen's concerns over the
coding style itself are addressed or withdrawn.
Andrew Bartlett
--
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list