From: Eric Blake Date: Mon, 2 Nov 2009 18:58:28 +0000 (-0700) Subject: Allow gcc builds with -Wall -Werror. X-Git-Tag: v2.2.7b~51 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=eae9d5832f84c14c69bec01d72d18bee8d38ec0d;p=thirdparty%2Flibtool.git 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 --- 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))