add if statements

This commit is contained in:
2025-06-03 13:24:12 +01:00
parent ef61c391a1
commit 18993a5d7e
16 changed files with 148 additions and 26 deletions

View File

@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../memory.h"
const char *WHITE_SPACE = " \t\n\r\f\v";
@@ -12,7 +13,7 @@ char *cloneString(char *str) {
}
size_t len = strlen(str);
char *clone = malloc((len + 1) * sizeof(char));
char *clone = checked_malloc((len + 1) * sizeof(char));
if (clone == NULL) {
return NULL;