Skip to content

Commit

Permalink
EINVAL on bad EAI
Browse files Browse the repository at this point in the history
  • Loading branch information
haesbaert committed Dec 1, 2022
1 parent 97f093d commit a26ddac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib_eio_linux/eio_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ CAMLprim value caml_eio_getaddrinfo(value vnode, value vserv, value vopts)
for (i = 0; i < (sizeof(gai_errors) / sizeof(int)); i++)
if (gai_errors[i] == retcode)
break;
if (i == (sizeof(gai_errors) / sizeof(int)))
if (i == (sizeof(gai_errors) / sizeof(int))) {
errno = EINVAL;
uerror("invalid gai_error", Nothing);
}
vret = caml_alloc_small(1, 1); /* 1 = Error */
Field(vret, 0) = Val_int(i);
}
Expand Down

0 comments on commit a26ddac

Please sign in to comment.