Skip to content

Commit

Permalink
small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 12, 2012
1 parent cad16c9 commit 77ef091
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ext/writev/writev.c
Expand Up @@ -42,13 +42,12 @@ static VALUE rb_writev(VALUE io, VALUE list)
iov[i].iov_len = RSTRING_LEN(string); iov[i].iov_len = RSTRING_LEN(string);
} }


if((written = writev(fptr->fd, iov, (int)RARRAY_LEN(list))) == -1) { written = writev(fptr->fd, iov, (int)RARRAY_LEN(list));
xfree(iov);
rb_sys_fail_path(fptr->pathv);
}


xfree(iov); xfree(iov);


if (written == -1) rb_sys_fail_path(fptr->pathv);

return LONG2FIX(written); return LONG2FIX(written);
} }


Expand Down

0 comments on commit 77ef091

Please sign in to comment.