Index: source/lib/tests/test_secure_crt.h =================================================================== --- source/lib/tests/test_secure_crt.h +++ source/lib/tests/test_secure_crt.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -139,21 +139,21 @@ static void TEST_CAT2(char* dst, size_t max_dst_chars, const char* src, const char* dst_val, int expected_ret, const char* expected_dst) { + TS_ASSERT(dst); strcpy(dst, dst_val); int ret = strcat_s(dst, max_dst_chars, src); TS_ASSERT_EQUALS(ret, expected_ret); - if(dst != 0) - TS_ASSERT(!strcmp(dst, expected_dst)); + TS_ASSERT(!strcmp(dst, expected_dst)); } static void TEST_NCAT(char* dst, size_t max_dst_chars, const char* src, size_t max_src_chars, const char* dst_val, int expected_ret, const char* expected_dst) { + TS_ASSERT(dst); strcpy(dst, dst_val); int ret = strncat_s(dst, max_dst_chars, src, (max_src_chars)); TS_ASSERT_EQUALS(ret, expected_ret); - if(dst != 0) - TS_ASSERT(!strcmp(dst, expected_dst)); + TS_ASSERT(!strcmp(dst, expected_dst)); } public: