aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-05-11 01:26:02 +0000
committerNeil Conway <neilc@samurai.com>2005-05-11 01:26:02 +0000
commitf38e413b209d33d70b3dbdb6fd799a59e392140c (patch)
treed3bd5b66472be4c09b2e18c60baae9789178d925 /src/backend/utils
parent35e16515080868e87849a6846ab1c36977157154 (diff)
downloadpostgresql-f38e413b209d33d70b3dbdb6fd799a59e392140c.tar.gz
postgresql-f38e413b209d33d70b3dbdb6fd799a59e392140c.zip
Code cleanup: in C89, there is no point casting the first argument to
memset() or MemSet() to a char *. For one, memset()'s first argument is a void *, and further void * can be implicitly coerced to/from any other pointer type.
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/cache/relcache.c6
-rw-r--r--src/backend/utils/cache/syscache.c4
-rw-r--r--src/backend/utils/fmgr/dfmgr.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index c012650a573..c4dc65f784a 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.222 2005/05/06 17:24:54 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.223 2005/05/11 01:26:02 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -297,7 +297,7 @@ AllocateRelationDesc(Relation relation, Form_pg_class relp)
/*
* clear all fields of reldesc
*/
- MemSet((char *) relation, 0, sizeof(RelationData));
+ MemSet(relation, 0, sizeof(RelationData));
relation->rd_targblock = InvalidBlockNumber;
/* make sure relation is marked as having no open file yet */
@@ -315,7 +315,7 @@ AllocateRelationDesc(Relation relation, Form_pg_class relp)
*/
relationForm = (Form_pg_class) palloc(CLASS_TUPLE_SIZE);
- memcpy((char *) relationForm, (char *) relp, CLASS_TUPLE_SIZE);
+ memcpy(relationForm, relp, CLASS_TUPLE_SIZE);
/* initialize relation tuple form */
relation->rd_rel = relationForm;
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 0cea023bb90..c6cfbc5be24 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/cache/syscache.c,v 1.98 2005/04/14 20:03:26 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/cache/syscache.c,v 1.99 2005/05/11 01:26:02 neilc Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@@ -455,7 +455,7 @@ InitCatalogCache(void)
Assert(!CacheInitialized);
- MemSet((char *) SysCache, 0, sizeof(SysCache));
+ MemSet(SysCache, 0, sizeof(SysCache));
for (cacheId = 0; cacheId < SysCacheSize; cacheId++)
{
diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c
index bffba525cae..3c33fbfa6f0 100644
--- a/src/backend/utils/fmgr/dfmgr.c
+++ b/src/backend/utils/fmgr/dfmgr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.79 2004/12/31 22:01:31 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.80 2005/05/11 01:26:02 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -126,7 +126,7 @@ load_external_function(char *filename, char *funcname,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
- MemSet((char *) file_scanner, 0, sizeof(DynamicFileList));
+ MemSet(file_scanner, 0, sizeof(DynamicFileList));
strcpy(file_scanner->filename, fullname);
file_scanner->device = stat_buf.st_dev;
#ifndef WIN32