diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:24:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:40 +0100 |
commit | 2ee689b56a8ec09387e1fadcea3097537180e4a7 (patch) | |
tree | 8603e50531ba4bbd197a85018b023cf6e6fb814e | |
parent | d24db9dfe6cf87aacc6d484c93cd44676d659030 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I3ae78d781e686bfe9b0513183da7fc8edd81024b
-rw-r--r-- | soltools/cpp/_macro.c | 2 | ||||
-rw-r--r-- | soltools/cpp/_mcrvalid.c | 10 | ||||
-rw-r--r-- | soltools/cpp/_nlist.c | 2 | ||||
-rw-r--r-- | soltools/mkdepend/cppsetup.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c index 8484035bb120..318b7f132f56 100644 --- a/soltools/cpp/_macro.c +++ b/soltools/cpp/_macro.c @@ -376,7 +376,7 @@ void } else { /* tp is == lp, therefore does not point to valid memory: */ - mvl_add(pValidators,np,0); + mvl_add(pValidators,np,NULL); } /* reset trp->tp to original position: */ diff --git a/soltools/cpp/_mcrvalid.c b/soltools/cpp/_mcrvalid.c index 81eefd74eb87..7a64de71da64 100644 --- a/soltools/cpp/_mcrvalid.c +++ b/soltools/cpp/_mcrvalid.c @@ -26,7 +26,7 @@ void mvl_init(MacroValidatorList * out_pValidators) { - out_pValidators->pFirst = 0; + out_pValidators->pFirst = NULL; out_pValidators->nextFreeIdentifier = 1; } @@ -36,7 +36,7 @@ mvl_destruct(MacroValidatorList * out_pValidators) MacroValidator * pV = out_pValidators->pFirst; MacroValidator * pDel; for ( pDel = out_pValidators->pFirst; - pDel != 0; + pDel != NULL; pDel = pV ) { pV = pV->pNext; @@ -62,7 +62,7 @@ mvl_add( MacroValidatorList * inout_pValidators, MacroValidator * pNew = new(MacroValidator); pNew->pMacro = in_pMacro; - if (in_pTokenWhereMacroBecomesValid == 0) + if (in_pTokenWhereMacroBecomesValid == NULL) { pNew->nTokenWhereMacroBecomesValid = INVALID_TILL_ENDOFROW; } @@ -87,10 +87,10 @@ mvl_check( MacroValidatorList * inout_pValidators, { MacroValidator * pV; /* Running pointer */ MacroValidator * pCheckedOnes; /* Here new list is built. */ - pCheckedOnes = 0; + pCheckedOnes = NULL; for ( pV = inout_pValidators->pFirst; - pV != 0; + pV != NULL; pV = inout_pValidators->pFirst ) { inout_pValidators->pFirst = pV->pNext; diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c index ec9eaf426331..83516f461ac1 100644 --- a/soltools/cpp/_nlist.c +++ b/soltools/cpp/_nlist.c @@ -94,7 +94,7 @@ void kwdefined = np; np->val = NAME; np->vp = &deftr; - np->ap = 0; + np->ap = NULL; } } } diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c index a21457b27299..e472cb0299dd 100644 --- a/soltools/mkdepend/cppsetup.c +++ b/soltools/mkdepend/cppsetup.c @@ -156,7 +156,7 @@ _lookup_variable (const char *var, size_t len) char tmpbuf[MAXNAMELEN + 1]; if (len > MAXNAMELEN) - return 0; + return NULL; strncpy (tmpbuf, var, len); tmpbuf[len] = '\0'; |