projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovsdb-data: New function ovsdb_datum_from_shash().
[openvswitch]
/
lib
/
dpif-linux.c
diff --git
a/lib/dpif-linux.c
b/lib/dpif-linux.c
index 52d73c6bb76d404dd32dd70bfbd6775a20e242bd..635fe94111df4c97ba473746024743b7c37faad9 100644
(file)
--- a/
lib/dpif-linux.c
+++ b/
lib/dpif-linux.c
@@
-338,8
+338,7
@@
dpif_linux_port_poll(const struct dpif *dpif_, char **devnamep)
return ENOBUFS;
} else if (!shash_is_empty(&dpif->changed_ports)) {
struct shash_node *node = shash_first(&dpif->changed_ports);
return ENOBUFS;
} else if (!shash_is_empty(&dpif->changed_ports)) {
struct shash_node *node = shash_first(&dpif->changed_ports);
- *devnamep = xstrdup(node->name);
- shash_delete(&dpif->changed_ports, node);
+ *devnamep = shash_steal(&dpif->changed_ports, node);
return 0;
} else {
return EAGAIN;
return 0;
} else {
return EAGAIN;
@@
-478,8
+477,7
@@
dpif_linux_recv(struct dpif *dpif_, struct ofpbuf **bufp)
int retval;
int error;
int retval;
int error;
- buf = ofpbuf_new(65536 + DPIF_RECV_MSG_PADDING);
- ofpbuf_reserve(buf, DPIF_RECV_MSG_PADDING);
+ buf = ofpbuf_new_with_headroom(65536, DPIF_RECV_MSG_PADDING);
retval = read(dpif->fd, ofpbuf_tail(buf), ofpbuf_tailroom(buf));
if (retval < 0) {
error = errno;
retval = read(dpif->fd, ofpbuf_tail(buf), ofpbuf_tailroom(buf));
if (retval < 0) {
error = errno;
@@
-732,11
+730,7
@@
get_major(const char *target)
return major;
}
} else {
return major;
}
} else {
- static bool warned;
- if (!warned) {
- VLOG_WARN("%s:%d: syntax error", fn, ln);
- }
- warned = true;
+ VLOG_WARN_ONCE("%s:%d: syntax error", fn, ln);
}
}
}
}