All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian Göttsche" <cgzones@googlemail.com>
To: selinux@vger.kernel.org
Subject: [PATCH 13/25] libselinux: label_media::init(): drop dead assignment
Date: Mon,  3 May 2021 19:53:38 +0200	[thread overview]
Message-ID: <20210503175350.55954-14-cgzones@googlemail.com> (raw)
In-Reply-To: <20210503175350.55954-1-cgzones@googlemail.com>

The variable `lineno` is only used in the preceding loop and it always
set prior that to 0.

Found by clang-analyzer.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libselinux/src/label_media.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libselinux/src/label_media.c b/libselinux/src/label_media.c
index d202e5d5..eb27deaf 100644
--- a/libselinux/src/label_media.c
+++ b/libselinux/src/label_media.c
@@ -119,7 +119,6 @@ static int init(struct selabel_handle *rec, const struct selinux_opt *opts,
 			if (process_line(path, line_buf, pass, ++lineno, rec))
 				goto finish;
 		}
-		lineno = 0;
 
 		if (pass == 0) {
 			if (data->nspec == 0) {
-- 
2.31.1


  parent reply	other threads:[~2021-05-03 17:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 17:53 [PATCH 00/25] libselinux: misc compiler and static analyzer findings Christian Göttsche
2021-05-03 17:53 ` [PATCH 01/25] libselinux: sidtab_hash(): do not discard const qualifier Christian Göttsche
2021-05-03 17:53 ` [PATCH 02/25] libselinux: selinux_file_context_cmp(): " Christian Göttsche
2021-05-03 17:53 ` [PATCH 03/25] libselinux: label_common(): " Christian Göttsche
2021-05-03 17:53 ` [PATCH 04/25] libselinux: Sha1Finalise(): " Christian Göttsche
2021-05-03 17:53 ` [PATCH 05/25] libselinux: sefcontext_compile: mark local variable static Christian Göttsche
2021-05-03 17:53 ` [PATCH 06/25] libselinux: avcstat: use standard length modifier for unsigned long long Christian Göttsche
2021-05-03 17:53 ` [PATCH 07/25] libselinux: selinux_restorecon: mark local variable static Christian Göttsche
2021-05-03 17:53 ` [PATCH 08/25] libselinux: selabel_get_digests_all_partial_matches: free memory after FTS_D block Christian Göttsche
2021-05-03 17:53 ` [PATCH 09/25] libselinux: getconlist: free memory on multiple level arguments Christian Göttsche
2021-05-03 17:53 ` [PATCH 10/25] libselinux: exclude_non_seclabel_mounts(): drop unused variable Christian Göttsche
2021-05-03 17:53 ` [PATCH 11/25] libselinux: context_new(): drop dead assignment Christian Göttsche
2021-05-03 17:53 ` [PATCH 12/25] libselinux: label_x::init(): " Christian Göttsche
2021-05-03 17:53 ` Christian Göttsche [this message]
2021-05-03 17:53 ` [PATCH 14/25] libselinux: setexecfilecon(): " Christian Göttsche
2021-05-03 17:53 ` [PATCH 15/25] libselinux: getdefaultcon: free memory on multiple same arguments Christian Göttsche
2021-05-03 17:53 ` [PATCH 16/25] libselinux: store_stem(): do not free possible non-heap object Christian Göttsche
2021-05-03 17:53 ` [PATCH 17/25] libselinux: matchmediacon(): close file on error Christian Göttsche
2021-05-03 17:53 ` [PATCH 18/25] libselinux: init_selinux_config(): free resources " Christian Göttsche
2021-05-03 17:53 ` [PATCH 19/25] libselinux: label_file::init(): do not pass NULL to strdup Christian Göttsche
2021-05-03 17:53 ` [PATCH 20/25] libselinux: matchpathcon: free memory on realloc failure Christian Göttsche
2021-05-03 17:53 ` [PATCH 21/25] libselinux: label_db::db_init(): open file with CLOEXEC mode Christian Göttsche
2021-05-03 17:53 ` [PATCH 22/25] libselinux: drop redundant casts to the same type Christian Göttsche
2021-05-03 17:53 ` [PATCH 23/25] libselinux: sidtab_sid_stats(): unify parameter name Christian Göttsche
2021-05-03 17:53 ` [PATCH 24/25] libselinux: regex: unify parameter names Christian Göttsche
2021-05-03 17:53 ` [PATCH 25/25] libselinux: label_file.c: fix indent Christian Göttsche
2021-05-18 18:37 ` [PATCH 00/25] libselinux: misc compiler and static analyzer findings Petr Lautrbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210503175350.55954-14-cgzones@googlemail.com \
    --to=cgzones@googlemail.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.