Catalli's threaded switch
[sliver-openvswitch.git] / lib / dhcp.c
index a8f0244..e6d5735 100644 (file)
 #include <stdlib.h>
 #include "dynamic-string.h"
 #include "ofpbuf.h"
-
-#define THIS_MODULE VLM_dhcp
 #include "vlog.h"
 
+VLOG_DEFINE_THIS_MODULE(dhcp)
+
 /* Information about a DHCP argument type. */
 struct arg_type {
     const char *name;           /* Name. */
@@ -497,7 +497,7 @@ dhcp_option_equals(const struct dhcp_option *a, const struct dhcp_option *b)
 {
     return ((a->data != NULL) == (b->data != NULL)
             && a->n == b->n
-            && !memcmp(a->data, b->data, a->n));
+            && (!a->data || !memcmp(a->data, b->data, a->n)));
 }
 
 /* Replaces 'ds' by a string representation of 'msg'.  If 'multiline' is