mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +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:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.5 1996/11/10 01:20:44 bryanh Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.6 1997/08/12 20:16:04 momjian Exp $
|
||||
*
|
||||
* Alistair Crooks added the code for the regex caching
|
||||
* agc - cached the regular expressions used - there's a good chance
|
||||
@@ -166,8 +166,7 @@ fixedlen_regexeq(char *s, struct varlena* p, int charlen, int cflags)
|
||||
|
||||
/* be sure sterm is null-terminated */
|
||||
sterm = (char *) palloc(charlen + 1);
|
||||
memset(sterm, 0, charlen + 1);
|
||||
strncpy(sterm, s, charlen);
|
||||
strNcpy(sterm, s, charlen);
|
||||
|
||||
result = RE_compile_and_execute(p, sterm, cflags);
|
||||
|
||||
|
Reference in New Issue
Block a user