diff options
author | Neil Conway <neilc@samurai.com> | 2005-05-11 01:26:02 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2005-05-11 01:26:02 +0000 |
commit | f38e413b209d33d70b3dbdb6fd799a59e392140c (patch) | |
tree | d3bd5b66472be4c09b2e18c60baae9789178d925 /src/backend/access | |
parent | 35e16515080868e87849a6846ab1c36977157154 (diff) | |
download | postgresql-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/access')
-rw-r--r-- | src/backend/access/hash/hashovfl.c | 4 | ||||
-rw-r--r-- | src/backend/access/hash/hashpage.c | 6 | ||||
-rw-r--r-- | src/backend/access/hash/hashutil.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c index 81d25547e59..1b8b798b45d 100644 --- a/src/backend/access/hash/hashovfl.c +++ b/src/backend/access/hash/hashovfl.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashovfl.c,v 1.45 2004/12/31 21:59:13 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashovfl.c,v 1.46 2005/05/11 01:26:01 neilc Exp $ * * NOTES * Overflow pages look like ordinary relation pages. @@ -509,7 +509,7 @@ _hash_initbitmap(Relation rel, HashMetaPage metap, BlockNumber blkno) /* set all of the bits to 1 */ freep = HashPageGetBitmap(pg); - MemSet((char *) freep, 0xFF, BMPGSZ_BYTE(metap)); + MemSet(freep, 0xFF, BMPGSZ_BYTE(metap)); /* write out the new bitmap page (releasing write lock and pin) */ _hash_wrtbuf(rel, buf); diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c index 58478b18000..6b974683f81 100644 --- a/src/backend/access/hash/hashpage.c +++ b/src/backend/access/hash/hashpage.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashpage.c,v 1.48 2005/05/10 05:15:07 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashpage.c,v 1.49 2005/05/11 01:26:01 neilc Exp $ * * NOTES * Postgres hash pages look like ordinary relation pages. The opaque @@ -295,8 +295,8 @@ _hash_metapinit(Relation rel) metap->hashm_maxbucket = metap->hashm_lowmask = 1; /* nbuckets - 1 */ metap->hashm_highmask = 3; /* (nbuckets << 1) - 1 */ - MemSet((char *) metap->hashm_spares, 0, sizeof(metap->hashm_spares)); - MemSet((char *) metap->hashm_mapp, 0, sizeof(metap->hashm_mapp)); + MemSet(metap->hashm_spares, 0, sizeof(metap->hashm_spares)); + MemSet(metap->hashm_mapp, 0, sizeof(metap->hashm_mapp)); metap->hashm_spares[1] = 1; /* the first bitmap page is only spare */ metap->hashm_ovflpoint = 1; diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c index 4a5e84ecbbd..da0a91630f2 100644 --- a/src/backend/access/hash/hashutil.c +++ b/src/backend/access/hash/hashutil.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashutil.c,v 1.41 2004/12/31 21:59:13 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashutil.c,v 1.42 2005/05/11 01:26:01 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -56,7 +56,7 @@ _hash_formitem(IndexTuple itup) (sizeof(HashItemData) - sizeof(IndexTupleData)); hitem = (HashItem) palloc(nbytes_hitem); - memcpy((char *) &(hitem->hash_itup), (char *) itup, tuplen); + memcpy(&(hitem->hash_itup), itup, tuplen); return hitem; } |