diff options
author | Neil Conway <neilc@samurai.com> | 2004-01-07 18:56:30 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2004-01-07 18:56:30 +0000 |
commit | 192ad63bd765d448e91389c6ff1d75f8b18bb268 (patch) | |
tree | 85873642a16b5ac877dc443a681fe9249c210693 /src/backend/utils/adt/formatting.c | |
parent | afca5d50dc296580925b560fff0eb75bb48f0cbe (diff) | |
download | postgresql-192ad63bd765d448e91389c6ff1d75f8b18bb268.tar.gz postgresql-192ad63bd765d448e91389c6ff1d75f8b18bb268.zip |
More janitorial work: remove the explicit casting of NULL literals to a
pointer type when it is not necessary to do so.
For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.
Diffstat (limited to 'src/backend/utils/adt/formatting.c')
-rw-r--r-- | src/backend/utils/adt/formatting.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index d808ac90e25..25db1b0f5d3 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------- * formatting.c * - * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.71 2003/12/25 03:36:23 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.72 2004/01/07 18:56:28 neilc Exp $ * * * Portions Copyright (c) 1999-2003, PostgreSQL Global Development Group @@ -927,7 +927,7 @@ index_seq_search(char *str, KeyWord *kw, int *index) int poz; if (!KeyWord_INDEX_FILTER(*str)) - return (KeyWord *) NULL; + return NULL; if ((poz = *(index + (*str - ' '))) > -1) { @@ -940,10 +940,10 @@ index_seq_search(char *str, KeyWord *kw, int *index) return k; k++; if (!k->name) - return (KeyWord *) NULL; + return NULL; } while (*str == *k->name); } - return (KeyWord *) NULL; + return NULL; } static KeySuffix * @@ -959,7 +959,7 @@ suff_search(char *str, KeySuffix *suf, int type) if (!strncmp(str, s->name, s->len)) return s; } - return (KeySuffix *) NULL; + return NULL; } /* ---------- @@ -1246,7 +1246,7 @@ parse_format(FormatNode *node, char *str, KeyWord *kw, } n->type = NODE_TYPE_CHAR; n->character = *str; - n->key = (KeyWord *) NULL; + n->key = NULL; n->suffix = 0; ++n; x = *str; @@ -1266,7 +1266,7 @@ parse_format(FormatNode *node, char *str, KeyWord *kw, { n->type = NODE_TYPE_CHAR; n->character = *str; - n->key = (KeyWord *) NULL; + n->key = NULL; node_set = 1; last = 0; str++; @@ -2731,7 +2731,7 @@ DCH_cache_getnew(char *str) return ent; } - return (DCHCacheEntry *) NULL; /* never */ + return NULL; /* never */ } static DCHCacheEntry * @@ -2761,7 +2761,7 @@ DCH_cache_search(char *str) i++; } - return (DCHCacheEntry *) NULL; + return NULL; } static text * @@ -3362,7 +3362,7 @@ NUM_cache_search(char *str) i++; } - return (NUMCacheEntry *) NULL; + return NULL; } static void |