summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.h7
-rw-r--r--src/dynstr.c1
-rw-r--r--src/paths.c1
-rw-r--r--src/safe_fifo.c1
-rw-r--r--src/strutil.c1
-rw-r--r--src/thread-pthread.c1
-rw-r--r--src/timespec.c3
7 files changed, 1 insertions, 14 deletions
diff --git a/src/common.h b/src/common.h
index 87fa887..5b5da04 100644
--- a/src/common.h
+++ b/src/common.h
@@ -5,18 +5,13 @@
# include "config.h"
#endif
+#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include "compiler.h"
#include "macros.h"
-#ifdef DEBUG
-# include <assert.h>
-#else
-# define assert(x) /* x */
-#endif
-
#define API
#endif /* COMMON_H */
diff --git a/src/dynstr.c b/src/dynstr.c
index fa9e9e0..72db26d 100644
--- a/src/dynstr.c
+++ b/src/dynstr.c
@@ -67,7 +67,6 @@ const char* dynstr_peek(dynstr_t* str)
bool dynstr_nappend(dynstr_t* str, const char* add, size_t len)
{
- assert(str && add);
if (str->len + len >= str->size)
{
size_t ns = MAX(str->size * 2, str->len + len + 1);
diff --git a/src/paths.c b/src/paths.c
index 6a253ca..1bdc4e3 100644
--- a/src/paths.c
+++ b/src/paths.c
@@ -783,7 +783,6 @@ void paths_find(paths_t* paths, paths_source_t source,
void* userdata)
{
search_t* search;
- assert(paths && match && find_callback);
search = get_search(paths->search);
search->dir = paths_user_dir(paths, source);
search->dirs = paths_search_dirs(paths, source);
diff --git a/src/safe_fifo.c b/src/safe_fifo.c
index cdd634f..a294d1c 100644
--- a/src/safe_fifo.c
+++ b/src/safe_fifo.c
@@ -58,7 +58,6 @@ void safe_fifo_unref(safe_fifo_t* fifo)
void safe_fifo_push(safe_fifo_t* fifo, void* item)
{
- assert(fifo && item);
thread_lock_lock(fifo->lock);
do
{
diff --git a/src/strutil.c b/src/strutil.c
index 7d436ec..4502b83 100644
--- a/src/strutil.c
+++ b/src/strutil.c
@@ -83,7 +83,6 @@ char** split_len(const char* start, const char* end, char delim)
{
char** ret;
size_t count = 0, size = 2;
- assert(start && end);
assert(start <= end);
ret = malloc((size + 1) * sizeof(char*));
if (ret)
diff --git a/src/thread-pthread.c b/src/thread-pthread.c
index ad35d77..6e31cf9 100644
--- a/src/thread-pthread.c
+++ b/src/thread-pthread.c
@@ -339,6 +339,5 @@ void thread_data_set(thread_data_t *data, void *value)
void thread_once(thread_once_t *once, thread_run_once_t run)
{
- assert(once && run);
ABORTFAIL(pthread_once(once, run));
}
diff --git a/src/timespec.c b/src/timespec.c
index 42bc157..533f00d 100644
--- a/src/timespec.c
+++ b/src/timespec.c
@@ -195,7 +195,6 @@ void timespec_addms(struct timespec *ts, unsigned long ms)
void timespec_add(struct timespec *ts, const struct timespec *add)
{
- assert(ts && add);
ts->tv_nsec += add->tv_nsec;
ts->tv_sec += ts->tv_nsec / 1000000000 + add->tv_sec;
ts->tv_nsec = ts->tv_nsec % 1000000000;
@@ -203,7 +202,6 @@ void timespec_add(struct timespec *ts, const struct timespec *add)
int timespec_sub(struct timespec *ts, const struct timespec *sub)
{
- assert(ts && sub);
if (ts->tv_sec < sub->tv_sec)
{
ts->tv_sec = sub->tv_sec - ts->tv_sec;
@@ -255,7 +253,6 @@ int timespec_sub(struct timespec *ts, const struct timespec *sub)
int timespec_cmp(const struct timespec *x, const struct timespec *y)
{
- assert(x && y);
if (x->tv_sec < y->tv_sec)
{
return -1;