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 <fweimer@redhat.com>
This commit is contained in:
H.J. Lu 2020-02-01 05:43:34 -08:00
parent d8775136b5
commit 635d6fae03
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}