Commit 0ed07d49 authored by Neil Conway's avatar Neil Conway

Code cleanup: don't bother casting the argument to pfree() to void *

from another pointer type. Per C89, this is unnecessary, and it is common
practice throughout the rest of the tree anyway.
parent 93371ed3
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsort.c,v 1.88 2004/08/29 05:06:40 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsort.c,v 1.89 2004/09/27 04:01:22 neilc Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -185,7 +185,7 @@ void ...@@ -185,7 +185,7 @@ void
_bt_spooldestroy(BTSpool *btspool) _bt_spooldestroy(BTSpool *btspool)
{ {
tuplesort_end(btspool->sortstate); tuplesort_end(btspool->sortstate);
pfree((void *) btspool); pfree(btspool);
} }
/* /*
...@@ -551,7 +551,7 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, BTItem bti) ...@@ -551,7 +551,7 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, BTItem bti)
ItemPointerSet(&(state->btps_minkey->bti_itup.t_tid), ItemPointerSet(&(state->btps_minkey->bti_itup.t_tid),
oblkno, P_HIKEY); oblkno, P_HIKEY);
_bt_buildadd(wstate, state->btps_next, state->btps_minkey); _bt_buildadd(wstate, state->btps_next, state->btps_minkey);
pfree((void *) state->btps_minkey); pfree(state->btps_minkey);
/* /*
* Save a copy of the minimum key for the new page. We have to * Save a copy of the minimum key for the new page. We have to
...@@ -649,7 +649,7 @@ _bt_uppershutdown(BTWriteState *wstate, BTPageState *state) ...@@ -649,7 +649,7 @@ _bt_uppershutdown(BTWriteState *wstate, BTPageState *state)
ItemPointerSet(&(s->btps_minkey->bti_itup.t_tid), ItemPointerSet(&(s->btps_minkey->bti_itup.t_tid),
blkno, P_HIKEY); blkno, P_HIKEY);
_bt_buildadd(wstate, s->btps_next, s->btps_minkey); _bt_buildadd(wstate, s->btps_next, s->btps_minkey);
pfree((void *) s->btps_minkey); pfree(s->btps_minkey);
s->btps_minkey = NULL; s->btps_minkey = NULL;
} }
...@@ -767,7 +767,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2) ...@@ -767,7 +767,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
{ {
_bt_buildadd(wstate, state, bti); _bt_buildadd(wstate, state, bti);
if (should_free) if (should_free)
pfree((void *) bti); pfree(bti);
bti = (BTItem) tuplesort_getindextuple(btspool->sortstate, bti = (BTItem) tuplesort_getindextuple(btspool->sortstate,
true, &should_free); true, &should_free);
} }
...@@ -775,7 +775,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2) ...@@ -775,7 +775,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
{ {
_bt_buildadd(wstate, state, bti2); _bt_buildadd(wstate, state, bti2);
if (should_free2) if (should_free2)
pfree((void *) bti2); pfree(bti2);
bti2 = (BTItem) tuplesort_getindextuple(btspool2->sortstate, bti2 = (BTItem) tuplesort_getindextuple(btspool2->sortstate,
true, &should_free2); true, &should_free2);
} }
...@@ -794,7 +794,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2) ...@@ -794,7 +794,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
_bt_buildadd(wstate, state, bti); _bt_buildadd(wstate, state, bti);
if (should_free) if (should_free)
pfree((void *) bti); pfree(bti);
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.145 2004/09/16 16:58:28 tgl Exp $ * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.146 2004/09/27 04:01:23 neilc Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -282,8 +282,8 @@ write_group_file(Relation grel) ...@@ -282,8 +282,8 @@ write_group_file(Relation grel)
errmsg("could not rename file \"%s\" to \"%s\": %m", errmsg("could not rename file \"%s\" to \"%s\": %m",
tempname, filename))); tempname, filename)));
pfree((void *) tempname); pfree(tempname);
pfree((void *) filename); pfree(filename);
} }
...@@ -412,8 +412,8 @@ write_user_file(Relation urel) ...@@ -412,8 +412,8 @@ write_user_file(Relation urel)
errmsg("could not rename file \"%s\" to \"%s\": %m", errmsg("could not rename file \"%s\" to \"%s\": %m",
tempname, filename))); tempname, filename)));
pfree((void *) tempname); pfree(tempname);
pfree((void *) filename); pfree(filename);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment