]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: check the bytes read in cgroup_register_unchanged_process()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 28 Jul 2022 19:32:05 +0000 (13:32 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 28 Jul 2022 19:32:11 +0000 (13:32 -0600)
commit9d266da61515bb47b889a93229302e545da207fe
treea1195aed4e1f5f8b1294448152b1341f22743787
parentc7ad94e3180dc674f049b5e15f84ccdbded2ac61
api.c: check the bytes read in cgroup_register_unchanged_process()

Fix ignoring the number of bytes read, warning reported by Coverity
tool:

CID 258288 (#1 of 1): Ignoring number of bytes read (CHECKED_RETURN).
check_return: read(int, void *, size_t) returns the number of bytes
read, but it is ignored.

In cgroup_register_unchanged_process(), the number of byte read/written
using read()/write() are ignored but coverity it warns about the read()
only, let's fix it.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c