summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/sbus_tests.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tests/sbus_tests.c b/src/tests/sbus_tests.c
index 6086a42b..288163d6 100644
--- a/src/tests/sbus_tests.c
+++ b/src/tests/sbus_tests.c
@@ -108,7 +108,6 @@ const struct sbus_interface_meta pilot_meta = {
static int blink_handler(struct sbus_request *req, void *data)
{
DBusError error = DBUS_ERROR_INIT;
- const char *path;
dbus_int32_t duration = 0;
dbus_bool_t crashed;
@@ -116,12 +115,11 @@ static int blink_handler(struct sbus_request *req, void *data)
ck_assert(data != NULL);
ck_assert(data == req->intf->instance_data);
- path = dbus_message_get_path(req->message);
- ck_assert_str_eq(req->intf->path, path);
+ ck_assert_str_eq(req->intf->path, req->path);
- if (strcmp(path, "/test/fry") == 0) {
+ if (strcmp(req->path, "/test/fry") == 0) {
ck_assert_str_eq(data, "Don't crash");
- } else if (strcmp(path, "/test/leela") == 0) {
+ } else if (strcmp(req->path, "/test/leela") == 0) {
ck_assert_str_eq(data, "Crash into the billboard");
} else {
ck_abort();