Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2013 14:31:50 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        deeptech71 <deeptech71@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: the latest version of Clang/LLVM for the world and kernel
Message-ID:  <20130215223150.GG55866@funkthat.com>
In-Reply-To: <511E5B05.5050402@FreeBSD.org>
References:  <511E378E.3090200@gmail.com> <511E5B05.5050402@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dimitry Andric wrote this message on Fri, Feb 15, 2013 at 16:57 +0100:
> >/usr/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/md5-internal.c:191:30: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
> >*     os_memset(ctx, 0, sizeof(ctx));     /* In case it's sensitive */
> >*                              ^~~
> >There just has to be an organization behind these backdoors...
> 
> No, this is just a very common error.  The idiom is either:
> 
>   memset(&object, 0, sizeof object);
> 
> or
> 
>   memset(&pointer, 0, sizeof *pointer);
> 
> but apparently it is difficult to choose the right one. :)

I assume you mean:
	memset(pointer, 0, sizeof *pointer);

:)

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130215223150.GG55866>