446cf2
commit 635d6fae03257129b4672591b700a495cb6cb6c7
446cf2
Author: H.J. Lu <hjl.tools@gmail.com>
446cf2
Date:   Sat Feb 1 05:43:34 2020 -0800
446cf2
446cf2
    x86: Don't make 2 calls to dlerror () in a row
446cf2
    
446cf2
    We shouldn't make 2 calls to dlerror () in a row since the first call
446cf2
    will clear the error.  We should just use the return value from the
446cf2
    first call.
446cf2
    
446cf2
    Tested on Linux/x86-64.
446cf2
    
446cf2
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
446cf2
---
446cf2
446cf2
diff --git a/sysdeps/x86/tst-cet-legacy-5.c b/sysdeps/x86/tst-cet-legacy-5.c
446cf2
index e1ca09d..0a34d37 100644
446cf2
--- a/sysdeps/x86/tst-cet-legacy-5.c
446cf2
+++ b/sysdeps/x86/tst-cet-legacy-5.c
446cf2
@@ -39,7 +39,7 @@ do_test_1 (const char *modname, bool fail)
446cf2
 	      == NULL)
446cf2
 	    {
446cf2
 	      printf ("incorrect dlopen '%s' error: %s\n", modname,
446cf2
-		      dlerror ());
446cf2
+		      err);
446cf2
 	      exit (1);
446cf2
 	    }
446cf2
 
446cf2
diff --git a/sysdeps/x86/tst-cet-legacy-6.c b/sysdeps/x86/tst-cet-legacy-6.c
446cf2
index 184a35b..bd45218 100644
446cf2
--- a/sysdeps/x86/tst-cet-legacy-6.c
446cf2
+++ b/sysdeps/x86/tst-cet-legacy-6.c
446cf2
@@ -39,7 +39,7 @@ do_test_1 (const char *modname, bool fail)
446cf2
 	      == NULL)
446cf2
 	    {
446cf2
 	      printf ("incorrect dlopen '%s' error: %s\n", modname,
446cf2
-		      dlerror ());
446cf2
+		      err);
446cf2
 	      exit (1);
446cf2
 	    }
446cf2
 
446cf2