summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-chat.c
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2015-01-22 22:53:42 +0100
committerRonny Chevalier <chevalier.ronny@gmail.com>2015-01-22 23:10:56 +0100
commit0c0cdb06c139b52ff103287f6909b3daa5b2dc54 (patch)
treef904cb032c43691d325b6bb19941a2c115a07416 /src/libsystemd/sd-bus/test-bus-chat.c
parent714af6af8a912650f9129f8b056ed92589443060 (diff)
tests: use assert_se instead of assert
Otherwise they can be optimized away with -DNDEBUG
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-chat.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-chat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c
index 06edd621e4..8625ee6d89 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/sd-bus/test-bus-chat.c
@@ -19,7 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <assert.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
@@ -44,7 +43,7 @@ static int match_callback(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus
static int object_callback(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
int r;
- assert(bus);
+ assert_se(bus);
if (sd_bus_message_is_method_error(m, NULL))
return 0;
@@ -68,7 +67,7 @@ static int server_init(sd_bus **_bus) {
int r;
const char *unique;
- assert(_bus);
+ assert_se(_bus);
r = sd_bus_open_user(&bus);
if (r < 0) {
@@ -299,7 +298,7 @@ static void* client1(void*p) {
goto finish;
}
- assert(streq(hello, "hello"));
+ assert_se(streq(hello, "hello"));
if (pipe2(pp, O_CLOEXEC|O_NONBLOCK) < 0) {
log_error_errno(errno, "Failed to allocate pipe: %m");