[PATCH] LDB: Redudant test on NULL context remove
Simo
simo at samba.org
Mon Apr 18 15:27:49 UTC 2016
On Thu, 2016-03-31 at 10:38 +0200, Volker Lendecke wrote:
> On Thu, Mar 31, 2016 at 08:27:28AM +0200, Petr Cech wrote:
> >
> > For clarity:
> >
> > original mail is
> > https://lists.samba.org/archive/samba-technical/2016-March/113068.h
> > tml
> >
> > the main idea is
> >
> > "There is redudant test on NULL context in ldb_dn_new_fmt()
> > function.
> > We use this (NULL) context in talloc_vasprintf() function which is
> > able to work with NULL at all. And at the end, we free this newly
> > created (by talloc_vasprintf) context. So it should be safe to
> > remove
> > this check."
> If you follow that path fully, even the !ldb check is redundant.
> ldb_dn_new will deal with ldb==NULL fine and return NULL.
>
> By the way, our convention is to add a signed-off-by (git commit -s)
> flag to patches. Can you do that?
>
> You might also internally contact Simo Sorce. He has put in those
> checks ages ago, maybe he has some comments on your patches.
Patch looks good to me.
I think it is ok to keep the check on ldb != NULL, to avoid busywork.
Reviwed-by: Simo Sorce <idra at samba.org>
Can a second team member add their reviewed-by ?
Simo.
More information about the samba-technical
mailing list