Skip to content
Snippets Groups Projects
Commit 2597056c authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Use sizeof() rather than strlen() in array size.

parent e6cba715
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/port/path.c,v 1.19 2004/06/10 22:26:24 momjian Exp $ * $PostgreSQL: pgsql/src/port/path.c,v 1.20 2004/06/11 17:09:13 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -252,7 +252,7 @@ set_pglocale_pgservice(const char *argv0, const char *app) ...@@ -252,7 +252,7 @@ set_pglocale_pgservice(const char *argv0, const char *app)
{ {
char path[MAXPGPATH]; char path[MAXPGPATH];
char my_exec_path[MAXPGPATH]; char my_exec_path[MAXPGPATH];
char env_path[MAXPGPATH + strlen("PGLOCALEDIR=")]; /* longer than PGSYSCONFDIR */ char env_path[MAXPGPATH + sizeof("PGLOCALEDIR=")]; /* longer than PGSYSCONFDIR */
/* don't set LC_ALL in the backend */ /* don't set LC_ALL in the backend */
if (strcmp(app, "postgres") != 0) if (strcmp(app, "postgres") != 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment