diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-27 18:40:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-27 18:40:10 +0000 |
commit | c92f7e258ee579abd0f95183598edf250d351b2c (patch) | |
tree | 10c6b377a74c61b71ece70cfd3cb209795bf1051 /src/port/thread.c | |
parent | 996b203e621bc76985ff0156b4f2ef720944b41b (diff) | |
download | postgresql-c92f7e258ee579abd0f95183598edf250d351b2c.tar.gz postgresql-c92f7e258ee579abd0f95183598edf250d351b2c.zip |
Replace strncpy with strlcpy in selected places that seem possibly relevant
to performance. (A wholesale effort to get rid of strncpy should be
undertaken sometime, but not during beta.) This commit also fixes dynahash.c
to correctly truncate overlength string keys for hashtables, so that its
callers don't have to anymore.
Diffstat (limited to 'src/port/thread.c')
-rw-r--r-- | src/port/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port/thread.c b/src/port/thread.c index 04f42f55b2c..74e6508c36a 100644 --- a/src/port/thread.c +++ b/src/port/thread.c @@ -7,7 +7,7 @@ * * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/port/thread.c,v 1.34 2006/07/06 02:12:32 momjian Exp $ + * $PostgreSQL: pgsql/src/port/thread.c,v 1.35 2006/09/27 18:40:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -81,7 +81,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen) #endif #else /* no strerror_r() available, just use strerror */ - StrNCpy(strerrbuf, strerror(errnum), buflen); + strlcpy(strerrbuf, strerror(errnum), buflen); return strerrbuf; #endif |