summaryrefslogtreecommitdiff
path: root/otherlibs/unix/socketpair.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/socketpair.c')
-rw-r--r--otherlibs/unix/socketpair.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/otherlibs/unix/socketpair.c b/otherlibs/unix/socketpair.c
index 15cc82b245..03a0dc98ec 100644
--- a/otherlibs/unix/socketpair.c
+++ b/otherlibs/unix/socketpair.c
@@ -42,9 +42,9 @@ CAMLprim value unix_socketpair(value cloexec, value domain,
unix_set_cloexec(sv[1], "socketpair", Nothing);
}
#endif
- res = caml_alloc_small(2, 0);
- Field(res,0) = Val_int(sv[0]);
- Field(res,1) = Val_int(sv[1]);
+ res = caml_alloc_2(0,
+ Val_int(sv[0]),
+ Val_int(sv[1]));
return res;
}