diff options
author | Simon McVittie <smcv@collabora.com> | 2017-11-27 19:26:03 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2017-12-04 11:52:52 +0000 |
commit | f59b4f9226c0134f91fc1eefebef6e7a816f85cd (patch) | |
tree | beda5c6503d7bb010ee42abf15ea9a23466140a8 /test/test-shell-service.c | |
parent | 38ff6bd20d58b57a5dd0eab1b1c09c5c43b61d26 (diff) | |
download | dbus-f59b4f9226c0134f91fc1eefebef6e7a816f85cd.tar.gz |
test-utils: Separate failable and non-failable functions
test_object_try_whatever() now has libdbus-like OOM handling,
while test_object_whatever() has GLib-like OOM handling. This is
because an overwhelming majority of the callers of these functions
either didn't check for OOM anyway, or checked for it but then
aborted. In the uncommon case where we do care, we can use the _try_
version.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/test-shell-service.c')
-rw-r--r-- | test/test-shell-service.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test-shell-service.c b/test/test-shell-service.c index 2eaccc1d..b9de92b6 100644 --- a/test/test-shell-service.c +++ b/test/test-shell-service.c @@ -145,9 +145,8 @@ main (int argc, loop = _dbus_loop_new (); if (loop == NULL) die ("No memory\n"); - - if (!test_connection_setup (loop, connection)) - die ("No memory\n"); + + test_connection_setup (loop, connection); if (!dbus_connection_add_filter (connection, filter_func, NULL, NULL)) |