From: Kevin Day Date: Sat, 26 Mar 2022 03:41:11 +0000 (-0500) Subject: Bugfix: Invalid F_parameter error in f_socket functions. X-Git-Tag: 0.5.9~67 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=34b7af77588523ebdc8df9cee722c61132bf34b0;p=fll Bugfix: Invalid F_parameter error in f_socket functions. For these functions, the length pointer is optional and therefore must allow the length pointer to be 0. --- diff --git a/level_0/f_socket/c/socket.c b/level_0/f_socket/c/socket.c index 0d78e54..1860fbb 100644 --- a/level_0/f_socket/c/socket.c +++ b/level_0/f_socket/c/socket.c @@ -315,7 +315,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ if (!socket) return F_status_set_error(F_parameter); if (!buffer) return F_status_set_error(F_parameter); - if (!length) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ const ssize_t result = recvfrom(socket->id, buffer, socket->size_read, flags, socket->address, &socket->length); @@ -393,7 +392,6 @@ extern "C" { #ifndef _di_level_0_parameter_checking_ if (!socket) return F_status_set_error(F_parameter); if (!buffer) return F_status_set_error(F_parameter); - if (!length) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ const ssize_t result = sendto(socket->id, buffer, socket->size_write, flags, socket->address, socket->length);