mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.2 1996/11/06 08:48:26 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.3 1997/08/12 20:15:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -223,7 +223,7 @@ strmake(char *str, int len)
|
||||
if (len <= 0) len = strlen(str);
|
||||
|
||||
newstr = (char *) palloc((unsigned) len+1);
|
||||
(void) strncpy(newstr, str, len);
|
||||
strNcpy(newstr, str, len);
|
||||
newstr[len] = (char) 0;
|
||||
return newstr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user