Date: Fri, 9 Apr 2021 20:47:08 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 93c14c55ec0d - main - libc: constify dummy error message string for dlfcn Message-ID: <202104092047.139Kl8CQ071480@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=93c14c55ec0da311dc09c1c8c1c7ecd5f2fae51a commit 93c14c55ec0da311dc09c1c8c1c7ecd5f2fae51a Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-04-05 04:14:39 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-04-09 20:46:23 +0000 libc: constify dummy error message string for dlfcn Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29623 --- 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?202104092047.139Kl8CQ071480>