From 361569d2997d80e806444094223f0c5b35d10ea1 Mon Sep 17 00:00:00 2001 From: Rudd-O Date: Sat, 23 May 2020 01:41:38 +0000 Subject: [PATCH] Fix incorrect comparison with assignment This should not set the address when comparing. Classic C error. --- sambapatch.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sambapatch.diff b/sambapatch.diff index 5e86413..ddaa690 100644 --- a/sambapatch.diff +++ b/sambapatch.diff @@ -363,7 +363,7 @@ index 0000000..55a5f1e +} + +static void set_addr(struct ifaddrs_container *ifa, int family, const void *data, size_t byteCount) { -+ if (ifa->ifa.ifa_addr = NULL) { ++ if (ifa->ifa.ifa_addr == NULL) { + // Assume this is IFA_LOCAL, if not set_local_addr will fix it. + ifa->ifa.ifa_addr = copy_addr(family, data, byteCount, &ifa->addr, ifa->idx); + } else {