diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2007-02-10 14:58:55 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2007-02-10 14:58:55 +0000 |
commit | 4ab8fcba8a33c7b0be3b7a9ff3aa7121d6b630f1 (patch) | |
tree | 8e6e3011902f42b082c07f0fc7bf8edbd94b2a09 /src/bin/pg_resetxlog/pg_resetxlog.c | |
parent | 1a1474b4c019c09032114906a049bbe3b70052fc (diff) | |
download | postgresql-4ab8fcba8a33c7b0be3b7a9ff3aa7121d6b630f1.tar.gz postgresql-4ab8fcba8a33c7b0be3b7a9ff3aa7121d6b630f1.zip |
StrNCpy -> strlcpy (not complete)
Diffstat (limited to 'src/bin/pg_resetxlog/pg_resetxlog.c')
-rw-r--r-- | src/bin/pg_resetxlog/pg_resetxlog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index 9705baced7c..1cb7fef0596 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.56 2007/02/01 19:10:29 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.57 2007/02/10 14:58:55 petere Exp $ * *------------------------------------------------------------------------- */ @@ -498,14 +498,14 @@ GuessControlValues(void) fprintf(stderr, _("%s: invalid LC_COLLATE setting\n"), progname); exit(1); } - StrNCpy(ControlFile.lc_collate, localeptr, LOCALE_NAME_BUFLEN); + strlcpy(ControlFile.lc_collate, localeptr, sizeof(ControlFile.lc_collate)); localeptr = setlocale(LC_CTYPE, ""); if (!localeptr) { fprintf(stderr, _("%s: invalid LC_CTYPE setting\n"), progname); exit(1); } - StrNCpy(ControlFile.lc_ctype, localeptr, LOCALE_NAME_BUFLEN); + strlcpy(ControlFile.lc_ctype, localeptr, sizeof(ControlFile.lc_ctype)); /* * XXX eventually, should try to grovel through old XLOG to develop more |