]> granicus.if.org Git - postgresql/commit
Standardize naming of malloc/realloc/strdup wrapper functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 2 Oct 2012 19:35:10 +0000 (15:35 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 2 Oct 2012 19:35:48 +0000 (15:35 -0400)
commita563d941803535dbd27d4191fe7729497b7fdf31
tree79048d522a1b35451381970fcec821e18f3cf0ab
parent779f80b75d448d61cf3388645505c9fd81000bb2
Standardize naming of malloc/realloc/strdup wrapper functions.

We had a number of variants on the theme of "malloc or die", with the
majority named like "pg_malloc", but by no means all.  Standardize on the
names pg_malloc, pg_malloc0, pg_realloc, pg_strdup.  Get rid of pg_calloc
entirely in favor of using pg_malloc0.

This is an essentially cosmetic change, so no back-patch.  (I did find
a couple of places where psql and pg_dump were using plain malloc or
strdup instead of the pg_ versions, but they don't look significant
enough to bother back-patching.)
28 files changed:
contrib/oid2name/oid2name.c
contrib/pgbench/pgbench.c
src/bin/initdb/initdb.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivexlog.c
src/bin/pg_basebackup/receivelog.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/streamutil.h
src/bin/pg_ctl/pg_ctl.c
src/bin/pg_dump/compress_io.c
src/bin/pg_dump/dumpmem.c
src/bin/pg_dump/dumpmem.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_custom.c
src/bin/pg_dump/pg_backup_directory.c
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump_sort.c
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/common.h
src/bin/psql/copy.c
src/bin/psql/describe.c
src/bin/psql/print.c
src/bin/psql/psqlscan.l
src/bin/psql/startup.c
src/bin/scripts/common.c
src/bin/scripts/common.h