for (Con *child = (Con*)-1; (child == (Con*)-1) && ((child = 0), true);) \
TAILQ_FOREACH(child, &((head)->nodes_head), nodes)
+#define NODES_FOREACH_REVERSE(head) \
+ for (Con *child = (Con*)-1; (child == (Con*)-1) && ((child = 0), true);) \
+ TAILQ_FOREACH_REVERSE(child, &((head)->nodes_head), nodes_head, nodes)
+
/* greps the ->nodes of the given head and returns the first node that matches the given condition */
#define GREP_FIRST(dest, head, condition) \
NODES_FOREACH(head) { \
*/
bool update_if_necessary(uint32_t *destination, const uint32_t new_value);
-/**
- * Safe-wrapper around malloc which exits if malloc returns NULL (meaning that
- * there is no more memory available)
- *
- */
-void *smalloc(size_t size);
-
-/**
- * Safe-wrapper around calloc which exits if malloc returns NULL (meaning that
- * there is no more memory available)
- *
- */
-void *scalloc(size_t size);
-
-/**
- * Safe-wrapper around realloc which exits if realloc returns NULL (meaning
- * that there is no more memory available).
- *
- */
-void *srealloc(void *ptr, size_t size);
-
-/**
- * Safe-wrapper around strdup which exits if malloc returns NULL (meaning that
- * there is no more memory available)
- *
- */
-char *sstrdup(const char *str);
-
/**
* Starts the given application by passing it through a shell. We use double
* fork to avoid zombie processes. As the started application’s parent exits