Skip to content

Commit

Permalink
Documentation/accounting/getdelays.c: handle sendto() failures
Browse files Browse the repository at this point in the history
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" <[email protected]>
Cc: Balbir Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed May 27, 2011
1 parent fbdd91a commit 4ed960b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/accounting/getdelays.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ static int get_family_id(int sd)
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
CTRL_ATTR_FAMILY_NAME, (void *)name,
strlen(TASKSTATS_GENL_NAME)+1);
if (rc < 0)
return 0; /* sendto() failure? */

rep_len = recv(sd, &ans, sizeof(ans), 0);
if (ans.n.nlmsg_type == NLMSG_ERROR ||
Expand Down

0 comments on commit 4ed960b

Please sign in to comment.