diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2011-05-26 19:25:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:34 -0400 |
commit | 4ed960b14d3b5fd14f1d9eb02f6d7e398317627a (patch) | |
tree | bcbe96919f4b19e2fd98366385aa41fba84699c4 /Documentation/accounting | |
parent | fbdd91a6293f5e7fb1914966f5d244f72619641e (diff) |
Documentation/accounting/getdelays.c: handle sendto() failures
Fixes
Documentation/accounting/getdelays.c: In function `get_family_id':
Documentation/accounting/getdelays.c:172:14: warning: variable `rc' set but not used [-Wunused-but-set-variable]
Reported-by: "Justin P. Mattock" <justinmattock@gmail.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/accounting')
-rw-r--r-- | Documentation/accounting/getdelays.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index 16e16d57b9eb..fed225401dd2 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -177,6 +177,8 @@ static int get_family_id(int sd) | |||
177 | rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY, | 177 | rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY, |
178 | CTRL_ATTR_FAMILY_NAME, (void *)name, | 178 | CTRL_ATTR_FAMILY_NAME, (void *)name, |
179 | strlen(TASKSTATS_GENL_NAME)+1); | 179 | strlen(TASKSTATS_GENL_NAME)+1); |
180 | if (rc < 0) | ||
181 | return 0; /* sendto() failure? */ | ||
180 | 182 | ||
181 | rep_len = recv(sd, &ans, sizeof(ans), 0); | 183 | rep_len = recv(sd, &ans, sizeof(ans), 0); |
182 | if (ans.n.nlmsg_type == NLMSG_ERROR || | 184 | if (ans.n.nlmsg_type == NLMSG_ERROR || |