From: Karel Zak Date: Wed, 29 Jul 2015 11:54:54 +0000 (+0200) Subject: lsipc: value is never read [clang analyze] X-Git-Tag: v2.27-rc1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9380fbefa617212c1f4ee8941e14f763ee24d919;p=thirdparty%2Futil-linux.git lsipc: value is never read [clang analyze] Signed-off-by: Karel Zak --- diff --git a/sys-utils/lsipc.c b/sys-utils/lsipc.c index 045c0e8c10..a30dcbd6ce 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); }