Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2597056

Browse files
committed
Use sizeof() rather than strlen() in array size.
1 parent e6cba71 commit 2597056

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/port/path.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/path.c,v 1.19 2004/06/10 22:26:24 momjian Exp $
11+
* $PostgreSQL: pgsql/src/port/path.c,v 1.20 2004/06/11 17:09:13 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -252,7 +252,7 @@ set_pglocale_pgservice(const char *argv0, const char *app)
252252
{
253253
char path[MAXPGPATH];
254254
char my_exec_path[MAXPGPATH];
255-
char env_path[MAXPGPATH + strlen("PGLOCALEDIR=")]; /* longer than PGSYSCONFDIR */
255+
char env_path[MAXPGPATH + sizeof("PGLOCALEDIR=")]; /* longer than PGSYSCONFDIR */
256256

257257
/* don't set LC_ALL in the backend */
258258
if (strcmp(app, "postgres") != 0)

0 commit comments

Comments
 (0)