From 9380fbefa617212c1f4ee8941e14f763ee24d919 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 29 Jul 2015 13:54:54 +0200 Subject: lsipc: value is never read [clang analyze] Signed-off-by: Karel Zak --- sys-utils/lsipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys-utils/lsipc.c') 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); } -- cgit v1.2.3-55-g7522