Skip to content
Commit 18936337 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

cgroup: don't use fread in read_cgroup_prop()



I think this version of code is a bit more readable.
It doesn't do memcpy and doesn't allocate FILE.
Everyone knows arguments for read(), but only a few of
us know arguments for fread().

CID 73345 (#1 of 1): String not null terminated (STRING_NULL)
2. string_null_argument: Function fread does not terminate string *buf. [Note: The source code implementation of the function has been overridden by a builtin model.]

Cc: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Acked-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent a19e945f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment