From ae50ba7f345cca4bb09e40e44176759cae50b1ce Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 4 Jun 2021 14:50:59 -0400 Subject: [PATCH] Partial #1052, Network test cases --- src/os/inc/osapi-network.h | 4 ++-- src/unit-tests/osnetwork-test/ut_osnetwork_misc_test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/os/inc/osapi-network.h b/src/os/inc/osapi-network.h index c4339e800..99badf779 100644 --- a/src/os/inc/osapi-network.h +++ b/src/os/inc/osapi-network.h @@ -61,8 +61,8 @@ int32 OS_NetworkGetID(void); * If configured in the underlying network stack, * this function retrieves the local hostname of the system. * - * @param[out] host_name Buffer to hold name information - * @param[in] name_len Maximum length of host name buffer + * @param[out] host_name Buffer to hold name information @nonnull + * @param[in] name_len Maximum length of host name buffer @nonzero * * @return Execution status, see @ref OSReturnCodes * @retval #OS_SUCCESS @copybrief OS_SUCCESS diff --git a/src/unit-tests/osnetwork-test/ut_osnetwork_misc_test.c b/src/unit-tests/osnetwork-test/ut_osnetwork_misc_test.c index c4944db2d..dc1bf3a97 100644 --- a/src/unit-tests/osnetwork-test/ut_osnetwork_misc_test.c +++ b/src/unit-tests/osnetwork-test/ut_osnetwork_misc_test.c @@ -150,7 +150,7 @@ void UT_os_networkgethostname_test() /*-----------------------------------------------------*/ /* #1 Null-pointer-arg */ - UT_RETVAL(OS_NetworkGetHostName(NULL, 0), OS_INVALID_POINTER); + UT_RETVAL(OS_NetworkGetHostName(NULL, sizeof(buffer)), OS_INVALID_POINTER); /*-----------------------------------------------------*/ /* #2 Zero-name-length-arg */