Removed all exit calls
This commit is contained in:
parent
b2d67cca8d
commit
b2f4a4b8e4
11
ll.h
11
ll.h
|
@ -118,9 +118,8 @@ llList * _llInsert(llList * list, size_t id, void * value)
|
|||
{
|
||||
if (node->next == NULL && id > 1)
|
||||
{
|
||||
fprintf(stderr, "RUNTIME ERROR: Index out of bounds\n");
|
||||
llFree(list);
|
||||
exit(1);
|
||||
fprintf(stderr, "ERROR: Index out of bounds\n");
|
||||
return list;
|
||||
}
|
||||
|
||||
prev = node;
|
||||
|
@ -154,8 +153,7 @@ llList * _llDelete(llList * list, size_t id)
|
|||
if (node->next == NULL)
|
||||
{
|
||||
fprintf(stderr, "RUNTIME ERROR: Index out of bounds\n");
|
||||
llFree(list);
|
||||
exit(1);
|
||||
return list;
|
||||
}
|
||||
|
||||
prev = node;
|
||||
|
@ -199,8 +197,7 @@ void * _llGetRef(llList * list, size_t id)
|
|||
if (node->next == NULL)
|
||||
{
|
||||
fprintf(stderr, "RUNTIME ERROR: Index out of bounds\n");
|
||||
llFree(list);
|
||||
exit(1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
node = node->next;
|
||||
|
|
Loading…
Reference in New Issue