...
Code Block | ||
---|---|---|
| ||
#define MIN_SIZE_ALLOWED 10 int verify_size(int *list, size_t list_size) { if (size < MIN_SIZE_ALLOWED) { /* Handle Error Condition */ free(list); return -1; } /* Process list */ return 0; } void process_list(int *list, size_t number) { /* ... */ if (verify_size(list,number); == -1) { /* Handle Error */ } /* Continue Processing list */ free(list); } |
...