1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Neil Conway
2005-05-11 01:26:02 +00:00
parent 35e1651508
commit f38e413b20
9 changed files with 28 additions and 28 deletions

View File

@ -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;