diff options
Diffstat (limited to 'src/libstrongswan/utils.c')
-rw-r--r-- | src/libstrongswan/utils.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libstrongswan/utils.c b/src/libstrongswan/utils.c index 357858c9e..6ffb62aaf 100644 --- a/src/libstrongswan/utils.c +++ b/src/libstrongswan/utils.c @@ -102,6 +102,14 @@ void memxor(u_int8_t dst[], u_int8_t src[], size_t n) /** * Described in header. */ +void memwipe_noinline(void *ptr, size_t n) +{ + memwipe_inline(ptr, n); +} + +/** + * Described in header. + */ void *memstr(const void *haystack, const char *needle, size_t n) { unsigned const char *pos = haystack; @@ -247,8 +255,6 @@ bool return_false() } /** -<<<<<<< HEAD -======= * returns FAILED */ status_t return_failed() @@ -257,7 +263,6 @@ status_t return_failed() } /** ->>>>>>> upstream/4.5.1 * nop operation */ void nop() @@ -290,7 +295,7 @@ bool ref_put(refcount_t *ref) bool more_refs; pthread_mutex_lock(&ref_mutex); - more_refs = --(*ref); + more_refs = --(*ref) > 0; pthread_mutex_unlock(&ref_mutex); return !more_refs; } |