[PATCH] ntdb: Make sure variables passed by value are initialized.
Andreas Schneider
asn at samba.org
Fri Oct 11 07:40:29 MDT 2013
On Friday 11 October 2013 16:09:13 Alexander Bokovoy wrote:
> On Fri, Oct 11, 2013 at 02:44:50PM +0200, Andreas Schneider wrote:
> > This fixes a GCC warning.
> >
> > Signed-off-by: Andreas Schneider <asn at samba.org>
> > ---
> >
> > lib/ntdb/check.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/ntdb/check.c b/lib/ntdb/check.c
> > index 2790c68..58bfc5d 100644
> > --- a/lib/ntdb/check.c
> > +++ b/lib/ntdb/check.c
> > @@ -659,10 +659,10 @@ _PUBLIC_ enum NTDB_ERROR ntdb_check_(struct
> > ntdb_context *ntdb,>
> > enum NTDB_ERROR (*check)(NTDB_DATA, NTDB_DATA, void *),
> > void *data)
> >
> > {
> >
> > - ntdb_off_t *fr = NULL, *used = NULL, ft, recovery;
> > + ntdb_off_t *fr = NULL, *used = NULL, ft = NULL, recovery = NULL;
>
> ntdb_off_t is defined as uint64_t in lib/ntdb/private.h:
> typedef uint64_t ntdb_off_t;
>
> Could you please use 0 for 'ft' and 'recovery'?
Arg, that's why I hate if you have pointers and variables mixed in one line.
--
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list