diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2014-02-25 14:11:00 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-02-25 14:11:00 +0000 |
commit | 2234b4a503ec82c028c0931f070ba8aaaa075a98 (patch) | |
tree | 2552718d8ec68407df2a6d2ca0fa331e655a262f /examples | |
parent | 035d95159197df995e9989661b6310905ebdaf6b (diff) |
examples: test-cgroups: don't put code with side effects into g_assert()
The g_assert() might get compiled out with the right
compiler/preprocessor flags.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test-cgroups.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/test-cgroups.c b/examples/test-cgroups.c index 0412e4d..600fa3c 100644 --- a/examples/test-cgroups.c +++ b/examples/test-cgroups.c @@ -107,9 +107,11 @@ static void gst_rtsp_cgroup_pool_init (GstRTSPCGroupPool * pool) { pool->user = cgroup_new_cgroup ("user"); - g_assert (cgroup_add_controller (pool->user, "cpu") != NULL); + if (cgroup_add_controller (pool->user, "cpu") == NULL) + g_error ("Failed to add cpu controller to user cgroup"); pool->admin = cgroup_new_cgroup ("admin"); - g_assert (cgroup_add_controller (pool->admin, "cpu") != NULL); + if (cgroup_add_controller (pool->admin, "cpu") == NULL) + g_error ("Failed to add cpu controller to admin cgroup"); } static void |