projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netdev-linux: Fix pairing of rtnetlink register and unregister calls.
[openvswitch]
/
lib
/
dhcp.c
diff --git
a/lib/dhcp.c
b/lib/dhcp.c
index a8f024482b3a8a62eec3d3baf51a4a53730cf091..62ede06e43b793ed5f3e38be135632a0765713ac 100644
(file)
--- a/
lib/dhcp.c
+++ b/
lib/dhcp.c
@@
-24,10
+24,10
@@
#include <stdlib.h>
#include "dynamic-string.h"
#include "ofpbuf.h"
#include <stdlib.h>
#include "dynamic-string.h"
#include "ofpbuf.h"
-
-#define THIS_MODULE VLM_dhcp
#include "vlog.h"
#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(dhcp);
+
/* Information about a DHCP argument type. */
struct arg_type {
const char *name; /* Name. */
/* 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
{
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
}
/* Replaces 'ds' by a string representation of 'msg'. If 'multiline' is
@@
-561,8
+561,7
@@
parse_options(struct dhcp_msg *msg, const char *name, void *data, size_t size,
{
struct ofpbuf b;
{
struct ofpbuf b;
- b.data = data;
- b.size = size;
+ ofpbuf_use_const(&b, data, size);
for (;;) {
uint8_t *code, *len;
void *payload;
for (;;) {
uint8_t *code, *len;
void *payload;