remove unnecessary check

Sun, 26 Sep 2021 12:01:25 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 26 Sep 2021 12:01:25 +0200
changeset 416
a79b2388db5e
parent 415
067aa769796a
child 418
ab30d32ae798

remove unnecessary check

src/linked_list.c file | annotate | diff | comparison | revisions
--- a/src/linked_list.c	Sun Sep 26 11:57:27 2021 +0200
+++ b/src/linked_list.c	Sun Sep 26 12:01:25 2021 +0200
@@ -52,11 +52,6 @@
 }
 
 int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *new_node) {
-    // TODO: how do we report error messages?
-    if (loc_next < 0 || (begin == NULL && end == NULL)) {
-        return 1;
-    }
-
     void *last = cx_linked_list_last(begin, end, loc_next);
     if (last == NULL) {
         if (begin == NULL) {

mercurial