mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-12-11 13:26:01 +00:00
fbf77104c3
Rather than duplicating the following sequence: 1. Read len from file 2. alloc up space based on 1 3. read the contents into the buffer from 2 4. null terminate the buffer from 2 Use the str_read() function that is in the kernel, which collapses steps 2 and 4. This not only reduces redundant code, but also has the side-affect of providing a central check on zero_or_saturated lengths from step 1 when generating string values. Signed-off-by: William Roberts <william.c.roberts@intel.com> |
||
---|---|---|
.. | ||
cil | ||
include | ||
man | ||
src | ||
tests | ||
utils | ||
.gitignore | ||
Android.mk | ||
ChangeLog | ||
COPYING | ||
Makefile | ||
VERSION |