Skip to contentSkip to conversation

ap: fixup incorrect return

PATCH Applied James Prestwood 2 participants 2 messages Nov 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ap: fixup incorrect return

If an RTNL address change fails -EIO should be returned, not false (aka "success").

---
 src/ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/ap.c +1 -1
index bfa9d47e..bebd7295 100644
@@ -2412,7 +2412,7 @@ static int ap_load_profile_and_dhcp(struct ap_state *ap, bool *wait_dhcp)
 
 		if (!ap->rtnl_add_cmd) {
 			l_error("Failed to add IPv4 address");
-			return false;
+			return -EIO;
 		}
 
 		ap->cleanup_ip = true;
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 6 lines · James Prestwood

If an RTNL address change fails -EIO should be returned, not false (aka "success").

---
  src/ap.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Regards,
-Denis