summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2010-01-26 14:25:21 +0100
committerMichael Stapelberg <michael@stapelberg.de>2010-01-26 14:25:21 +0100
commitc166d2e2d312e198a4dc9039302c5b82ed2805d1 (patch)
tree811c40f33c8a4c98429448d54229fe2b593bb896 /src
parenta820cf4ce0440bfc3d66c96a57f6ac660f83c210 (diff)
get_ip_address: return NULL instead of down
Diffstat (limited to 'src')
-rw-r--r--src/print_ip_addr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/print_ip_addr.c b/src/print_ip_addr.c
index 6ddd35a..e719d2f 100644
--- a/src/print_ip_addr.c
+++ b/src/print_ip_addr.c
@@ -25,10 +25,8 @@ const char *get_ip_addr(const char *interface) {
getifaddrs(&ifaddr);
- if (ifaddr == NULL) {
- (void)snprintf(part, sizeof(part), "E: down");
- return part;
- }
+ if (ifaddr == NULL)
+ return NULL;
addrp = ifaddr;