summaryrefslogtreecommitdiffstats
path: root/sys-utils/lsipc.c
diff options
context:
space:
mode:
authorKarel Zak2015-07-29 13:54:54 +0200
committerKarel Zak2015-07-29 13:54:54 +0200
commit9380fbefa617212c1f4ee8941e14f763ee24d919 (patch)
tree0f397aa20035a9ed1108329e1858b8d2efab0842 /sys-utils/lsipc.c
parentfdisk: value is never read [clang analyze] (diff)
downloadkernel-qcow2-util-linux-9380fbefa617212c1f4ee8941e14f763ee24d919.tar.gz
kernel-qcow2-util-linux-9380fbefa617212c1f4ee8941e14f763ee24d919.tar.xz
kernel-qcow2-util-linux-9380fbefa617212c1f4ee8941e14f763ee24d919.zip
lsipc: value is never read [clang analyze]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lsipc.c')
-rw-r--r--sys-utils/lsipc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys-utils/lsipc.c b/sys-utils/lsipc.c
index 045c0e8c1..a30dcbd6c 100644
--- a/sys-utils/lsipc.c
+++ b/sys-utils/lsipc.c
@@ -1013,7 +1013,8 @@ static void do_shm(int id, struct lsipc_control *ctl, struct libscols_table *tb)
case COL_STATUS: {
int comma = 0;
size_t offt = 0;
- free (arg);
+
+ free(arg);
arg = xcalloc(1, sizeof(char) * strlen(_("dest"))
+ strlen(_("locked"))
+ strlen(_("hugetlb"))
@@ -1036,7 +1037,7 @@ static void do_shm(int id, struct lsipc_control *ctl, struct libscols_table *tb)
if (shmdsp->shm_perm.mode & SHM_NORESERVE) {
if (comma)
arg[offt++] = ',';
- offt += sprintf(arg + offt, "%s", _("noreserve"));
+ sprintf(arg + offt, "%s", _("noreserve"));
}
rc = scols_line_set_data(ln, n, arg);
}