1
0
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:
Bruce Momjian
1997-08-12 20:16:25 +00:00
parent 4b851b1cfc
commit edb58721b8
44 changed files with 163 additions and 192 deletions

View File

@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements.
*
* $Id: variable.c,v 1.12 1997/06/20 17:17:03 thomas Exp $
* $Id: variable.c,v 1.13 1997/08/12 20:15:50 momjian Exp $
*
*/
@@ -70,8 +70,7 @@ static const char *get_token(char **tok, char **val, const char *str)
}
*tok = (char*) PALLOC(len + 1);
strncpy (*tok, start, len);
(*tok)[len] = '\0';
strNcpy (*tok, start, len);
/* skip white spaces */
while ( isspace(*str)) str++;
@@ -110,8 +109,7 @@ static const char *get_token(char **tok, char **val, const char *str)
}
*val = (char*) PALLOC(len + 1);
strncpy (*val, start, len);
(*val)[len] = '\0';
strNcpy (*val, start, len);
/* skip white spaces */
while ( isspace(*str)) str++;