Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

correctly set return code #11

Merged
merged 1 commit into from

2 participants

@tmakatos

No description provided.

@andreil andreil merged commit 6308041 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 25, 2012
  1. @tmakatos

    correctly set return code

    tmakatos authored
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 6 deletions.
  1. +9 −6 control/tap-ctl-stats.c
View
15 control/tap-ctl-stats.c
@@ -123,9 +123,10 @@ tap_ctl_stats_fwrite(pid_t pid, int minor, FILE *stream)
goto out;
len = message.u.info.length;
- err = len;
- if (len < 0)
+ if (len < 0) {
+ err = len;
goto out;
+ }
while (len) {
fd_set rfds;
@@ -136,14 +137,16 @@ tap_ctl_stats_fwrite(pid_t pid, int minor, FILE *stream)
FD_SET(sfd, &rfds);
n = select(sfd + 1, &rfds, NULL, NULL, NULL);
- err = n;
- if (n < 0)
+ if (n < 0) {
+ err = n;
goto out;
+ }
in = read(sfd, buf, bufsz);
- err = in;
- if (in <= 0)
+ if (in <= 0) {
+ err = in;
goto out;
+ }
len -= in;
Something went wrong with that request. Please try again.