svn commit: r297974 - in head/sys: i386/i386 i386/ibcs2 x86/x86

Pedro Giffuni pfg at FreeBSD.org
Thu Apr 14 17:27:31 UTC 2016



On 04/14/16 12:04, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Thu Apr 14 17:04:06 2016
> New Revision: 297974
> URL: https://svnweb.freebsd.org/changeset/base/297974
>
> Log:
>    x86: for pointers replace 0 with NULL.
>
>    These are mostly cosmetical, no functional change.
>
>    Found with devel/coccinelle.
>
> Modified:
>    head/sys/i386/i386/db_disasm.c
>    head/sys/i386/i386/pmap.c
>    head/sys/i386/ibcs2/imgact_coff.c
>    head/sys/x86/x86/nexus.c
>
...

>
> Modified: head/sys/i386/i386/pmap.c
> ==============================================================================
> --- head/sys/i386/i386/pmap.c	Thu Apr 14 16:32:27 2016	(r297973)
> +++ head/sys/i386/i386/pmap.c	Thu Apr 14 17:04:06 2016	(r297974)
> @@ -269,15 +269,15 @@ pt_entry_t *CMAP3;
>   static pd_entry_t *KPTD;
>   caddr_t ptvmmap = 0;
>   caddr_t CADDR3;
> -struct msgbuf *msgbufp = 0;
> +struct msgbuf *msgbufp = NULL;
>
>   /*
>    * Crashdump maps.
>    */
>   static caddr_t crashdumpmap;
>
> -static pt_entry_t *PMAP1 = 0, *PMAP2;
> -static pt_entry_t *PADDR1 = 0, *PADDR2;
> +static pt_entry_t *PMAP1 = NULL, *PMAP2;
> +static pt_entry_t *PADDR1 = NULL, *PADDR2;
>   #ifdef SMP
>   static int PMAP1cpu;
>   static int PMAP1changedcpu;
>

Hmm .. being static, there is no need to initialize these.

Pedro.


More information about the svn-src-all mailing list