1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Rename strNcpy to StrNCpy, and change third parameter.

This commit is contained in:
Bruce Momjian
1997-10-25 01:10:58 +00:00
parent 8b53f6e5b6
commit f3af1368bd
31 changed files with 87 additions and 83 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.15 1997/09/08 21:43:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.16 1997/10/25 01:09:16 momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
@@ -269,7 +269,7 @@ lo_import(text *filename)
/*
* open the file to be read in
*/
strNcpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ);
StrNCpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ + 1);
fd = open(fnamebuf, O_RDONLY, 0666);
if (fd < 0)
{ /* error */
@@ -343,7 +343,7 @@ lo_export(Oid lobjId, text *filename)
* open the file to be written to
*/
oumask = umask((mode_t) 0);
strNcpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ);
StrNCpy(fnamebuf, VARDATA(filename), VARSIZE(filename) - VARHDRSZ + 1);
fd = open(fnamebuf, O_CREAT | O_WRONLY, 0666);
umask(oumask);
if (fd < 0)