Skip to contentSkip to conversation

libexport.a: fix missing brace in host_ntop() fallback

PATCH In review Stefan Hajnoczi 2 participants 2 messages Feb 18, 2016 – Mar 16, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libexport.a: fix missing brace in host_ntop() fallback

An if statement has been missing a brace since host_ntop() was added in commit 94ce1eb94babb4c587b2826452fb053cba745098 ("libexport.a: Add helpers to manage DNS lookups").

---
 support/export/hostname.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/export/hostname.c +1 -1
index 4daabe9..94e98a5 100644
@@ -69,7 +69,7 @@ host_ntop(const struct sockaddr *sap, char *buf, const size_t buflen)
 
 	memset(buf, 0, buflen);
 
-	if (sin->sin_family != AF_INET)
+	if (sin->sin_family != AF_INET) {
 		(void)strncpy(buf, "bad family", buflen - 1);
 		return buf;
 	}
Signature · 1 line
2.5.0
#1 lore raw
Quoted 5 lines · Stefan Hajnoczi

An if statement has been missing a brace since host_ntop() was added in commit 94ce1eb94babb4c587b2826452fb053cba745098 ("libexport.a: Add helpers to manage DNS lookups").

Committed...

steved.

Quoted 18 lines
---
 support/export/hostname.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/export/hostname.c +1 -1
index 4daabe9..94e98a5 100644
@@ -69,7 +69,7 @@ host_ntop(const struct sockaddr *sap, char *buf, const size_t buflen)
 
 	memset(buf, 0, buflen);
 
-	if (sin->sin_family != AF_INET)
+	if (sin->sin_family != AF_INET) {
 		(void)strncpy(buf, "bad family", buflen - 1);
 		return buf;
 	}