libs/libc: Correct some errors in psignal() and stpncpy().

This commit is contained in:
Lokesh B V 2018-10-24 17:15:51 -06:00 committed by Gregory Nutt
parent f185c79ea6
commit 56b4bc8bcb
2 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ void psignal(int signum, FAR const char *message)
if (message != NULL) if (message != NULL)
{ {
(void)fprintf(stderr, "%s: %s\n", strsignal(signum)); (void)fprintf(stderr, "%s: %s\n", message, strsignal(signum));
} }
else else
{ {

View File

@ -46,7 +46,7 @@
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: strncpy * Name: stpncpy
* *
* Description: * Description:
* Copies the string pointed to by 'src' (including the terminating NUL * Copies the string pointed to by 'src' (including the terminating NUL
@ -68,8 +68,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_LIBC_ARCH_STRNCPY #ifndef CONFIG_LIBC_ARCH_STPNCPY
FAR char *strncpy(FAR char *dest, FAR const char *src, size_t n) FAR char *stpncpy(FAR char *dest, FAR const char *src, size_t n)
{ {
FAR char *end = dest + n; /* End of dest buffer + 1 byte */ FAR char *end = dest + n; /* End of dest buffer + 1 byte */
FAR char *ret; /* Value to be returned */ FAR char *ret; /* Value to be returned */