diff options
author | Ben Pfaff <blp@nicira.com> | 2010-05-19 14:13:23 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-06-17 10:30:18 -0700 |
commit | 8e2093fc182d6e418b998a55e3a9080d7f97cd0a (patch) | |
tree | 4efad06883c00c232f19ae1ca8403f5caf648ab7 /vswitchd | |
parent | 69123704450703f7ebea4af9e3b9635399fc21f2 (diff) |
netlink: Make nl_sock_transact() discard reply if 'replyp' is null.
Sometimes only the success or failure return value is interesting, not the
details of the reply, so this simplifies some callers.
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/proc-net-compat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vswitchd/proc-net-compat.c b/vswitchd/proc-net-compat.c index 72eb7be3..106a7c3f 100644 --- a/vswitchd/proc-net-compat.c +++ b/vswitchd/proc-net-compat.c @@ -72,7 +72,7 @@ proc_net_compat_init(void) static int set_proc_file(const char *dir, const char *file, const char *data) { - struct ofpbuf request, *reply; + struct ofpbuf request; int retval; ofpbuf_init(&request, 0); @@ -84,9 +84,8 @@ set_proc_file(const char *dir, const char *file, const char *data) nl_msg_put_string(&request, BRC_GENL_A_PROC_DATA, data); } - retval = nl_sock_transact(brc_sock, &request, &reply); + retval = nl_sock_transact(brc_sock, &request, NULL); ofpbuf_uninit(&request); - ofpbuf_delete(reply); if (retval) { VLOG_WARN_RL(&rl, "failed to %s /proc/%s/%s (%s)", data ? "update" : "remove", dir, file, strerror(retval)); |