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/commands/user.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/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 20be53fbd50..bd8c6b91b9e 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.131 2003/11/29 19:51:47 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.132 2004/01/07 18:56:25 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -986,7 +986,7 @@ AlterUserSet(AlterUserSetStmt *stmt) datum = SysCacheGetAttr(SHADOWNAME, oldtuple, Anum_pg_shadow_useconfig, &isnull); - array = isnull ? ((ArrayType *) NULL) : DatumGetArrayTypeP(datum); + array = isnull ? NULL : DatumGetArrayTypeP(datum); if (valuestr) array = GUCArrayAdd(array, stmt->variable, valuestr); @@ -1457,7 +1457,7 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag) /* Fetch old group membership. */ datum = heap_getattr(group_tuple, Anum_pg_group_grolist, pg_group_dsc, &null); - oldarray = null ? ((IdList *) NULL) : DatumGetIdListP(datum); + oldarray = null ? NULL : DatumGetIdListP(datum); /* initialize list with old array contents */ newlist = IdArrayToList(oldarray); |