From eae9d5832f84c14c69bec01d72d18bee8d38ec0d Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 2 Nov 2009 11:58:28 -0700 Subject: [PATCH] Allow gcc builds with -Wall -Werror. * libltdl/ltdl.c (try_dlopen): Use strlen rather than LT_STRLEN on an array that will never be NULL. Signed-off-by: Eric Blake Signed-off-by: Ralf Wildenhues --- ChangeLog | 6 ++++++ libltdl/ltdl.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index caf125a5a..057f9a4e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-02 Eric Blake + + Allow gcc builds with -Wall -Werror. + * libltdl/ltdl.c (try_dlopen): Use strlen rather than LT_STRLEN on + an array that will never be NULL. + 2009-11-01 Ralf Wildenhues Fix func_normal_abspath sed script for Solaris. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 80b56757a..a622357cb 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1264,7 +1264,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, if (vtable) { /* name + "." + libext + NULL */ - archive_name = MALLOC (char, LT_STRLEN (name) + LT_STRLEN (libext) + 2); + archive_name = MALLOC (char, LT_STRLEN (name) + strlen (libext) + 2); *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if ((*phandle == NULL) || (archive_name == NULL)) -- 2.47.2