diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2014-03-31 17:58:53 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2014-03-31 17:58:53 +0000 |
commit | 8643356b8542e0dcab358716f1e04d47b08b1a6d (patch) | |
tree | e10cc5a03f7ead69a2d4ed563cbd021df5770ef2 /otherlibs/unix/open.c | |
parent | cd1bf4b9fc898cee2f4886ed18ddf6271ec522e8 (diff) | |
parent | 989ac0b2635443b9c0f183ee6343b663c854f4ea (diff) | |
download | ocaml-ephemeron.tar.gz |
merge with trunk at rev 14512ephemeron
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/ephemeron@14514 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/open.c')
-rw-r--r-- | otherlibs/unix/open.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/otherlibs/unix/open.c b/otherlibs/unix/open.c index ecee013898..c98819aab4 100644 --- a/otherlibs/unix/open.c +++ b/otherlibs/unix/open.c @@ -62,8 +62,7 @@ CAMLprim value unix_open(value path, value flags, value perm) char * p; cv_flags = convert_flag_list(flags, open_flag_table); - p = caml_stat_alloc(string_length(path) + 1); - strcpy(p, String_val(path)); + p = caml_stat_alloc_string(path); /* open on a named FIFO can block (PR#1533) */ enter_blocking_section(); fd = open(p, cv_flags, Int_val(perm)); |