Date: Fri, 23 Apr 2021 11:14:50 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 083df155ef5b - stable/13 - libc: constify dummy error message string for dlfcn Message-ID: <202104231114.13NBEobW012896@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=083df155ef5b6f718a04e21d7f47597b02d8b371 commit 083df155ef5b6f718a04e21d7f47597b02d8b371 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-04-05 04:14:39 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-04-23 11:14:07 +0000 libc: constify dummy error message string for dlfcn (cherry picked from commit 93c14c55ec0da311dc09c1c8c1c7ecd5f2fae51a) --- lib/libc/gen/dlfcn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index 395a6d9402e8..6047f7ddd4d7 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "reentrant.h" -static char sorry[] = "Service unavailable"; +static const char sorry[] = "Service unavailable"; void _rtld_thread_init(void *); void _rtld_atfork_pre(int *); @@ -91,7 +91,7 @@ char * dlerror(void) { - return (sorry); + return (__DECONST(char *, sorry)); } #pragma weak dllockinit
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104231114.13NBEobW012896>