diff options
author | Sami Kerola | 2018-05-03 23:57:58 +0200 |
---|---|---|
committer | Karel Zak | 2018-05-10 11:25:05 +0200 |
commit | 8fd27bec0c5cb5ade55cf0a9d606aa1dbeeed95f (patch) | |
tree | 6958bac917532661a1f6528219a56a9a16218611 /login-utils | |
parent | lib/canonicalize: fix truncation warning (diff) | |
download | kernel-qcow2-util-linux-8fd27bec0c5cb5ade55cf0a9d606aa1dbeeed95f.tar.gz kernel-qcow2-util-linux-8fd27bec0c5cb5ade55cf0a9d606aa1dbeeed95f.tar.xz kernel-qcow2-util-linux-8fd27bec0c5cb5ade55cf0a9d606aa1dbeeed95f.zip |
zramctl: fix truncation warning
sys-utils/zramctl.c: In function ‘zram_get_sysfs’:
sys-utils/zramctl.c:220:52: warning: ‘%s’ directive output may be truncated
writing up to 4095 bytes into a region of size 27 [-Wformat-truncation=]
snprintf(z->devname, sizeof(z->devname), "/dev/%s", name);
As an additional good thing zramctl will no longer allocate 4096 bytes from
stack when just 23 bytes is enough.
[kzak@redhat.com: - use macro rather than hardcoded string for the path]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
0 files changed, 0 insertions, 0 deletions