diff options
Diffstat (limited to 'src/backend/postmaster/pgstat.c')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 2818e6f4218..620ccdeb382 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -569,7 +569,7 @@ pgstat_reset_remove_files(const char *directory) { DIR *dir; struct dirent *entry; - char fname[MAXPGPATH]; + char fname[MAXPGPATH * 2]; dir = AllocateDir(directory); while ((entry = ReadDir(dir, directory)) != NULL) @@ -599,7 +599,7 @@ pgstat_reset_remove_files(const char *directory) strcmp(entry->d_name + nchars, "stat") != 0) continue; - snprintf(fname, MAXPGPATH, "%s/%s", directory, + snprintf(fname, sizeof(fname), "%s/%s", directory, entry->d_name); unlink(fname); } |