aboutsummaryrefslogtreecommitdiff
path: root/avl.c
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2022-01-16 17:02:25 +0100
committerThomas Schmucker <ts@its1.de>2022-01-16 17:02:25 +0100
commit011ef70f4c1b6ef8384a3573d93595b42dba4395 (patch)
treec5ba35b8b9357c43ea0edb528f8f9d7afba17c00 /avl.c
parent1bb9e12dca59f6e97d14c938d37b9b492a9e546f (diff)
downloaddata-structures-011ef70f4c1b6ef8384a3573d93595b42dba4395.tar.gz
data-structures-011ef70f4c1b6ef8384a3573d93595b42dba4395.tar.bz2
data-structures-011ef70f4c1b6ef8384a3573d93595b42dba4395.zip
feat: use assert instead an ugly if-error-statement
Diffstat (limited to 'avl.c')
-rw-r--r--avl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/avl.c b/avl.c
index 0dfe6ca..5bb4415 100644
--- a/avl.c
+++ b/avl.c
@@ -110,8 +110,8 @@ insert_r(T x, struct tree_node *p, bool *h)
110 p->count++; /* hit counter */ 110 p->count++; /* hit counter */
111 *h = false; 111 *h = false;
112 } 112 }
113 if ( p == NULL ) 113 assert(p != NULL);
114 ERROR("das hier sollte niemals passieren"); 114
115 return p; 115 return p;
116} 116}
117/* -->8-- */ 117/* -->8-- */