mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
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.
This commit is contained in:
parent
035d951591
commit
2234b4a503
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue