summaryrefslogtreecommitdiffstats
path: root/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src')
-rw-r--r--lib/src/face.c6
-rw-r--r--lib/src/util/ip_address.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/src/face.c b/lib/src/face.c
index 832cd0936..81395c4b1 100644
--- a/lib/src/face.c
+++ b/lib/src/face.c
@@ -447,7 +447,9 @@ get_protocol (face_type_t face_type)
case FACE_TYPE_UDP_LISTENER:
return FACE_PROTOCOL_UDP;
- default:
- return FACE_PROTOCOL_UNKNOWN;
+ case FACE_TYPE_UNDEFINED:
+ case FACE_TYPE_N:
+ break;
}
+ return FACE_PROTOCOL_UNKNOWN;
}
diff --git a/lib/src/util/ip_address.c b/lib/src/util/ip_address.c
index 3624a6fca..b50864c96 100644
--- a/lib/src/util/ip_address.c
+++ b/lib/src/util/ip_address.c
@@ -241,6 +241,12 @@ hicn_ip_address_empty (const hicn_ip_address_t *ip)
return (memcmp (ip, &IP_ADDRESS_EMPTY, sizeof (hicn_ip_address_t)) == 0);
}
+void
+hicn_ip_address_clear (hicn_ip_address_t *address)
+{
+ memset (address, 0, sizeof (hicn_ip_address_t));
+}
+
/* Prefix */
/* Parse IP Prefixes in presentation format (in bits, separated by a slash) */