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