Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small refactor

  • Loading branch information...
commit 77ef09127bb03241ba5b7b62159adae0af77c81a 1 parent cad16c9
@tenderlove authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 ext/writev/writev.c
View
7 ext/writev/writev.c
@@ -42,13 +42,12 @@ static VALUE rb_writev(VALUE io, VALUE list)
iov[i].iov_len = RSTRING_LEN(string);
}
- if((written = writev(fptr->fd, iov, (int)RARRAY_LEN(list))) == -1) {
- xfree(iov);
- rb_sys_fail_path(fptr->pathv);
- }
+ written = writev(fptr->fd, iov, (int)RARRAY_LEN(list));
xfree(iov);
+ if (written == -1) rb_sys_fail_path(fptr->pathv);
+
return LONG2FIX(written);
}
Please sign in to comment.
Something went wrong with that request. Please try again.