Currently cgroup_get_subsys_mount_point_end(), does nothing more than
returning zero, it was caught by LGTM altering:
"This expression has no effect (because
cgroup_get_subsys_mount_point_end has no external side effects)."
make the function more useful like other *_end() functions by including
the check for cgroup_initialized and assigning NULL to the handle used
for iterating over controller mount points.
Reported-by: LGTM
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
int cgroup_get_subsys_mount_point_end(void **handle)
{
+ if (!cgroup_initialized)
+ return ECGROUPNOTINITIALIZED;
+ if (!handle)
+ return ECGINVAL;
+
+ *handle = NULL;
return 0;
}