diff options
author | Bernhard Schmidt <berni@debian.org> | 2018-10-14 22:51:08 +0200 |
---|---|---|
committer | Bernhard Schmidt <berni@debian.org> | 2018-10-14 22:51:08 +0200 |
commit | 87c2fd4310e5b345102d7a4915dc5e3a65052305 (patch) | |
tree | b7dc3d6d209bdb926c9e1ece7f9639aa1724b39e /tests/unit_tests/openvpn/mock_msg.c | |
parent | 3804bc2606a92e2f2f4b3a2b043af0d77d92b386 (diff) |
Revert "Merge branch 'stretch' of ssh://git.debian.org/git/collab-maint/openvpn into stretch"
This reverts commit 3804bc2606a92e2f2f4b3a2b043af0d77d92b386, reversing
changes made to 678cfd249add7ca758e4c41933c7b730132c99f4.
Diffstat (limited to 'tests/unit_tests/openvpn/mock_msg.c')
-rw-r--r-- | tests/unit_tests/openvpn/mock_msg.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/unit_tests/openvpn/mock_msg.c b/tests/unit_tests/openvpn/mock_msg.c index 060588f..eb0d5e9 100644 --- a/tests/unit_tests/openvpn/mock_msg.c +++ b/tests/unit_tests/openvpn/mock_msg.c @@ -29,12 +29,9 @@ #endif #include <stdarg.h> -#include <stddef.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> -#include <setjmp.h> -#include <cmocka.h> - #include "errlevel.h" #include "error.h" @@ -73,8 +70,14 @@ x_msg(const unsigned int flags, const char *format, ...) void assert_failed(const char *filename, int line, const char *condition) { - mock_assert(false, condition ? condition : "", filename, line); - /* Keep compiler happy. Should not happen, mock_assert() does not return */ + if (condition) + { + printf("Assertion failed at %s:%d (%s)", filename, line, condition); + } + else + { + printf("Assertion failed at %s:%d", filename, line); + } exit(1); } |