git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32f61d5
)
Remove unnecessary memset().
author
Jarno Rajahalme
<jrajahalme@nicira.com>
Tue, 17 Dec 2013 23:54:30 +0000
(15:54 -0800)
committer
Jarno Rajahalme
<jrajahalme@nicira.com>
Tue, 17 Dec 2013 23:54:30 +0000
(15:54 -0800)
We already set all the fields of the upcall, so memsetting right before
is unnecessary.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/dpif-linux.c
patch
|
blob
|
history
diff --git
a/lib/dpif-linux.c
b/lib/dpif-linux.c
index
ea2300a
..
f64e55b
100644
(file)
--- a/
lib/dpif-linux.c
+++ b/
lib/dpif-linux.c
@@
-1460,7
+1460,7
@@
parse_odp_packet(struct ofpbuf *buf, struct dpif_upcall *upcall,
return EINVAL;
}
- memset(upcall, 0, sizeof *upcall);
+ /* (Re)set ALL fields of '*upcall' on successful return. */
upcall->type = type;
upcall->key = CONST_CAST(struct nlattr *,
nl_attr_get(a[OVS_PACKET_ATTR_KEY]));