]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/dns-domain.c
Merge pull request #6974 from keszybz/clean-up-defines
[thirdparty/systemd.git] / src / shared / dns-domain.c
index d75abd8121b6cce6771a23276d55ed4cd6706438..4739cc880bc86a6baa6503d152b8e0588ff6abe2 100644 (file)
@@ -17,9 +17,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
  ***/
 
-#if defined(HAVE_LIBIDN2)
+#if HAVE_LIBIDN2
 #  include <idn2.h>
-#elif defined(HAVE_LIBIDN)
+#elif HAVE_LIBIDN
 #  include <idna.h>
 #  include <stringprep.h>
 #endif
@@ -300,7 +300,7 @@ int dns_label_escape_new(const char *p, size_t l, char **ret) {
         return r;
 }
 
-#ifdef HAVE_LIBIDN
+#if HAVE_LIBIDN
 int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max) {
         _cleanup_free_ uint32_t *input = NULL;
         size_t input_size, l;
@@ -1271,7 +1271,7 @@ int dns_name_common_suffix(const char *a, const char *b, const char **ret) {
 int dns_name_apply_idna(const char *name, char **ret) {
         /* Return negative on error, 0 if not implemented, positive on success. */
 
-#if defined(HAVE_LIBIDN2)
+#if HAVE_LIBIDN2
         int r;
         _cleanup_free_ char *t = NULL;
 
@@ -1311,7 +1311,7 @@ int dns_name_apply_idna(const char *name, char **ret) {
         if (IN_SET(r, IDN2_TOO_BIG_DOMAIN, IDN2_TOO_BIG_LABEL))
                 return -ENOSPC;
         return -EINVAL;
-#elif defined(HAVE_LIBIDN)
+#elif HAVE_LIBIDN
         _cleanup_free_ char *buf = NULL;
         size_t n = 0, allocated = 0;
         bool first = true;