From 56b4bc8bcb32e5bc0ffc9b1d90ae452eedf31a8d Mon Sep 17 00:00:00 2001 From: Lokesh B V Date: Wed, 24 Oct 2018 17:15:51 -0600 Subject: [PATCH] libs/libc: Correct some errors in psignal() and stpncpy(). --- libs/libc/signal/sig_psignal.c | 2 +- libs/libc/string/lib_stpncpy.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/libc/signal/sig_psignal.c b/libs/libc/signal/sig_psignal.c index 5ae92b136b..4b232e3d0a 100644 --- a/libs/libc/signal/sig_psignal.c +++ b/libs/libc/signal/sig_psignal.c @@ -79,7 +79,7 @@ void psignal(int signum, FAR const char *message) if (message != NULL) { - (void)fprintf(stderr, "%s: %s\n", strsignal(signum)); + (void)fprintf(stderr, "%s: %s\n", message, strsignal(signum)); } else { diff --git a/libs/libc/string/lib_stpncpy.c b/libs/libc/string/lib_stpncpy.c index 48f058d17d..74fdcf7c37 100644 --- a/libs/libc/string/lib_stpncpy.c +++ b/libs/libc/string/lib_stpncpy.c @@ -46,7 +46,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: strncpy + * Name: stpncpy * * Description: * Copies the string pointed to by 'src' (including the terminating NUL @@ -68,8 +68,8 @@ * ****************************************************************************/ -#ifndef CONFIG_LIBC_ARCH_STRNCPY -FAR char *strncpy(FAR char *dest, FAR const char *src, size_t n) +#ifndef CONFIG_LIBC_ARCH_STPNCPY +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 *ret; /* Value to be returned */