X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b04fe171f0375ecd5d8a24747ca1dff85720a0ca..6b200bc335dc93c5516ccb52f14bd896d8c7fad7:/SecurityTests/cspxutils/utilLib/t_stdlib.c?ds=inline diff --git a/SecurityTests/cspxutils/utilLib/t_stdlib.c b/SecurityTests/cspxutils/utilLib/t_stdlib.c deleted file mode 100644 index 8fac2df9..00000000 --- a/SecurityTests/cspxutils/utilLib/t_stdlib.c +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include -//#include - -#define POINTER void * -#define NULL_PTR NULL - -void T_free(POINTER block) -{ - if (block != NULL_PTR) { - free(block); - } -} - -POINTER T_malloc(unsigned int len) -{ - return (POINTER) malloc(len ? len : 1); -} - -/* these are not needed - they are in system.c in security_bsafe */ -#if 0 -int T_memcmp(POINTER firstBlock, POINTER secondBlock, unsigned int len) -{ - if (len == 0) { - return 0; - } - return memcmp(firstBlock, secondBlock, len); -} - -void T_memcpy(POINTER output, POINTER input, unsigned int len) -{ - if (len != 0) { - memcpy(output, input, len); - } -} - -void T_memmove(POINTER output, POINTER input, unsigned int len) -{ - if (len != 0) { - memmove(output, input, len); - } -} - -void T_memset(POINTER output, int value, unsigned int len) -{ - if (len != 0) { - memset(output, value, len); - } -} -#endif - -POINTER T_realloc(POINTER block, unsigned int len) -{ - if (block == NULL_PTR) - return (POINTER) malloc(len ? len : 1); - - return (POINTER)realloc(block, len); -}