From 34b7af77588523ebdc8df9cee722c61132bf34b0 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 25 Mar 2022 22:41:11 -0500 Subject: [PATCH] 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. --- level_0/f_socket/c/socket.c | 2 -- 1 file changed, 2 deletions(-) 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); -- 1.8.3.1