From: H.J. Lu Date: Sat, 1 Feb 2020 13:43:34 +0000 (-0800) Subject: x86: Don't make 2 calls to dlerror () in a row X-Git-Tag: glibc-2.32~769 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=635d6fae03257129b4672591b700a495cb6cb6c7;p=thirdparty%2Fglibc.git x86: Don't make 2 calls to dlerror () in a row We shouldn't make 2 calls to dlerror () in a row since the first call will clear the error. We should just use the return value from the first call. Tested on Linux/x86-64. Reviewed-by: Florian Weimer --- diff --git a/sysdeps/x86/tst-cet-legacy-5.c b/sysdeps/x86/tst-cet-legacy-5.c index b97e03d6343..6c9bba06f58 100644 --- a/sysdeps/x86/tst-cet-legacy-5.c +++ b/sysdeps/x86/tst-cet-legacy-5.c @@ -38,7 +38,7 @@ do_test_1 (const char *modname, bool fail) if (strstr (err, "shadow stack isn't enabled") == NULL) { printf ("incorrect dlopen '%s' error: %s\n", modname, - dlerror ()); + err); exit (1); } diff --git a/sysdeps/x86/tst-cet-legacy-6.c b/sysdeps/x86/tst-cet-legacy-6.c index 3c4a47f2db0..877e77747d5 100644 --- a/sysdeps/x86/tst-cet-legacy-6.c +++ b/sysdeps/x86/tst-cet-legacy-6.c @@ -38,7 +38,7 @@ do_test_1 (const char *modname, bool fail) if (strstr (err, "shadow stack isn't enabled") == NULL) { printf ("incorrect dlopen '%s' error: %s\n", modname, - dlerror ()); + err); exit (1); }