]> 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:34:33 +0000 (13:34 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 28 Jul 2022 19:34:35 +0000 (13:34 -0600)
commit67d073b8208f4e64c88777603e671bc8559cd599
tree0430fc059e756a57514815805c437256f9c4bcc6
parent713fa074a0129ba1676673582b2e9c9dc9eb40b1
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>
(cherry picked from commit 9d266da61515bb47b889a93229302e545da207fe)
src/api.c