summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2019-05-28 12:17:26 +0200
committerKarel Zak2019-05-28 12:17:26 +0200
commit517debc389414cce263ab1dbbb5a9df02a76a464 (patch)
treeb8518ba9915afc988493e5ea28b8e8b06b000b56 /sys-utils
parentlscpu: check scols_line_set_data() return value [coverity scan] (diff)
downloadkernel-qcow2-util-linux-517debc389414cce263ab1dbbb5a9df02a76a464.tar.gz
kernel-qcow2-util-linux-517debc389414cce263ab1dbbb5a9df02a76a464.tar.xz
kernel-qcow2-util-linux-517debc389414cce263ab1dbbb5a9df02a76a464.zip
readprofile: be more explicit with used types [cppcheck]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/readprofile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c
index 1d484252a..132386437 100644
--- a/sys-utils/readprofile.c
+++ b/sys-utils/readprofile.c
@@ -263,9 +263,9 @@ int main(int argc, char **argv)
size_t i;
for (p = buf + 1; p < buf + entries; p++) {
- if (*p & ~0U << (sizeof(*buf) * 4))
+ if (*p & ~0U << ((unsigned) sizeof(*buf) * 4U))
big++;
- if (*p & ((1 << (sizeof(*buf) * 4)) - 1))
+ if (*p & ((1U << ((unsigned) sizeof(*buf) * 4U)) - 1U))
small++;
}
if (big > small) {