diff options
author | Pedro Giffuni <pfg@apache.org> | 2016-04-10 02:30:31 +0000 |
---|---|---|
committer | Pedro Giffuni <pfg@apache.org> | 2016-04-10 02:30:31 +0000 |
commit | 8d94f9e44da8f3fdf55b1d814f921cb6dbdc37a3 (patch) | |
tree | 5a341ffd539e156a5894e85fe9e5252569adae22 /soltools | |
parent | aaf15142bcbc44f0e06a3357d2b21ecf9c673d21 (diff) |
Replace 0 with NULL for pointers.
Only applied to C code: common style for C++ is different.
Found with coccinelle: http://coccinelle.lip6.fr/
Notes
Notes:
prefer: 5bbdb9423e15b68438bb8397c15635e044129e28
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/cpp/_getopt.c | 4 | ||||
-rw-r--r-- | soltools/cpp/_mcrvalid.c | 10 | ||||
-rw-r--r-- | soltools/cpp/_nlist.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/soltools/cpp/_getopt.c b/soltools/cpp/_getopt.c index 43c907dba4e1..452d7832642f 100644 --- a/soltools/cpp/_getopt.c +++ b/soltools/cpp/_getopt.c @@ -54,7 +54,7 @@ int } } optopt = c = argv[optind][sp]; - if (c == ':' || (cp = strchr(opts, c)) == 0) + if (c == ':' || (cp = strchr(opts, c)) == NULL) { ERR(": illegal option -- ", c); if (argv[optind][++sp] == '\0') @@ -86,7 +86,7 @@ int sp = 1; optind++; } - optarg = 0; + optarg = NULL; } return c; } diff --git a/soltools/cpp/_mcrvalid.c b/soltools/cpp/_mcrvalid.c index 4e63df45a0ae..d8c274281fe6 100644 --- a/soltools/cpp/_mcrvalid.c +++ b/soltools/cpp/_mcrvalid.c @@ -35,7 +35,7 @@ void mvl_init(MacroValidatorList * out_pValidators) { - out_pValidators->pFirst = 0; + out_pValidators->pFirst = NULL; out_pValidators->nextFreeIdentifier = 1; } @@ -45,7 +45,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; @@ -71,7 +71,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; } @@ -111,10 +111,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 a82df50d6537..6e7eb93875c7 100644 --- a/soltools/cpp/_nlist.c +++ b/soltools/cpp/_nlist.c @@ -96,7 +96,7 @@ void kwdefined = np; np->val = NAME; np->vp = &deftr; - np->ap = 0; + np->ap = NULL; } } } |