mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -52,7 +52,7 @@ BSD44_derived_dlerror(void)
|
||||
{
|
||||
static char ret[BUFSIZ];
|
||||
|
||||
(void) strcpy(ret, error_message);
|
||||
strcpy(ret, error_message);
|
||||
error_message[0] = 0;
|
||||
return((ret[0] == 0) ? (char *) NULL : ret);
|
||||
}
|
||||
|
||||
@@ -466,8 +466,7 @@ static int readExports(ModulePtr mp)
|
||||
* must copy the first SYMNMLEN chars and make
|
||||
* sure we have a zero byte at the end.
|
||||
*/
|
||||
strncpy(tmpsym, ls->l_name, SYMNMLEN);
|
||||
tmpsym[SYMNMLEN] = '\0';
|
||||
strNcpy(tmpsym, ls->l_name, SYMNMLEN);
|
||||
symname = tmpsym;
|
||||
}
|
||||
ep->name = strdup(symname);
|
||||
|
||||
Reference in New Issue
Block a user