commit 4768b36: [Minor] Remove bogus condition

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Sep 20 19:35:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-09-20 20:30:25 +0100
URL: https://github.com/rspamd/rspamd/commit/4768b36e4d0d18f43962e4c54108ac1257f144fc (HEAD -> master)

[Minor] Remove bogus condition

---
 contrib/librdns/packet.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/contrib/librdns/packet.c b/contrib/librdns/packet.c
index cdb524705..99536668c 100644
--- a/contrib/librdns/packet.c
+++ b/contrib/librdns/packet.c
@@ -75,10 +75,7 @@ rdns_maybe_punycode_label (const uint8_t *begin,
 		p ++;
 	}
 
-	if (*p) {
-		*label_len = p - begin;
-	}
-	else {
+	if (label_len) {
 		*label_len = p - begin;
 	}
 


More information about the Commits mailing list