2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Remove redundant lt_dlerror() calls

The redundant lt_dlerror() calls were taken from the examples to clean
any previous errors from lt_dl...() calls.  However upon code
inspection, it was discovered there are no such paths that could cause
the lt_dlerror() to return spurious error messages.
This commit is contained in:
Ondřej Surý
2020-10-26 11:14:49 +01:00
committed by Michał Kępień
parent e06972eb2f
commit 0f49b02fc5
3 changed files with 1 additions and 16 deletions

View File

@@ -98,14 +98,6 @@ load_symbol(void *handle, const char *modpath, const char *symbol_name,
REQUIRE(handle != NULL);
REQUIRE(symbolp != NULL && *symbolp == NULL);
/*
* Clear any pre-existing error conditions before running dlsym().
* (In this case, we expect dlsym() to return non-NULL values
* and will always return an error if it returns NULL, but
* this ensures that we'll report the correct error condition
* if there is one.)
*/
lt_dlerror();
symbol = lt_dlsym(handle, symbol_name);
if (symbol == NULL) {
const char *errmsg = lt_dlerror();