diff --git a/configure.ac b/configure.ac index 67ae587..f81b667 100644 --- a/configure.ac +++ b/configure.ac @@ -60,12 +60,12 @@ AS_IF([test "x$enable_debug" = "xyes"], [ ]) AM_CONDITIONAL(OIDENTD, test x$enable_identd = xyes) AS_IF([test "x$with_openssl" != "xno"], [ + AC_CHECK_LIB(ssl, SSL_read, [], [ + AC_MSG_ERROR([library 'ssl' is required for OpenSSL support]) + ], -lssl) AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [ AC_MSG_ERROR([library 'crypto' is required for OpenSSL support]) ], -lcrypto) - AC_CHECK_LIB(ssl, SSL_read, [with_openssl=yes], [ - AC_MSG_ERROR([library 'ssl' is required for OpenSSL support]) - ]) ]) AC_CONFIG_FILES([Makefile]) diff --git a/src/util.c b/src/util.c index 3881057..d8bf50d 100644 --- a/src/util.c +++ b/src/util.c @@ -723,6 +723,8 @@ list_t *hash_keys(hash_t *hash) void hash_rename_key(hash_t *h, const char *oldk, const char *newk) { assert(h && oldk && newk); + if (strcmp(oldk, newk) == 0) + return; hash_insert(h, newk, hash_remove(h, oldk)); }