aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/smgr/md.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2014-01-06 21:30:26 -0500
committerPeter Eisentraut <peter_e@gmx.net>2014-01-06 21:30:26 -0500
commitedc43458d797a5956f4bf39af18cf62abb0077db (patch)
tree4468c5cec42e043168aab94491bb0f2905c1855f /src/backend/storage/smgr/md.c
parent10a82cda67731941c18256e009edad4a784a2994 (diff)
downloadpostgresql-edc43458d797a5956f4bf39af18cf62abb0077db.tar.gz
postgresql-edc43458d797a5956f4bf39af18cf62abb0077db.zip
Add more use of psprintf()
Diffstat (limited to 'src/backend/storage/smgr/md.c')
-rw-r--r--src/backend/storage/smgr/md.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index e62918195ea..268035ca92a 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -1649,9 +1649,7 @@ _mdfd_segpath(SMgrRelation reln, ForkNumber forknum, BlockNumber segno)
if (segno > 0)
{
- /* be sure we have enough space for the '.segno' */
- fullpath = (char *) palloc(strlen(path) + 12);
- sprintf(fullpath, "%s.%u", path, segno);
+ fullpath = psprintf("%s.%u", path, segno);
pfree(path);
}
else