Blame SOURCES/0026-libselinux-sidtab_sid_stats-unify-parameter-name.patch

ffbc92
From b1a4603c9208982e33291fe6dc5aa78148762530 Mon Sep 17 00:00:00 2001
ffbc92
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
ffbc92
Date: Mon, 3 May 2021 17:11:24 +0200
ffbc92
Subject: [PATCH] libselinux: sidtab_sid_stats(): unify parameter name
ffbc92
MIME-Version: 1.0
ffbc92
Content-Type: text/plain; charset=UTF-8
ffbc92
Content-Transfer-Encoding: 8bit
ffbc92
ffbc92
Found by clang-tidy.
ffbc92
ffbc92
libselinux/src/avc_sidtab.h:32:6: warning: function 'sidtab_sid_stats' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
ffbc92
void sidtab_sid_stats(struct sidtab *s, char *buf, int buflen) ;
ffbc92
     ^
ffbc92
libselinux/src/avc_sidtab.c:103:6: note: the definition seen here
ffbc92
void sidtab_sid_stats(struct sidtab *h, char *buf, int buflen)
ffbc92
     ^
ffbc92
libselinux/src/avc_sidtab.h:32:6: note: differing parameters are named here: ('s'), in definition: ('h')
ffbc92
void sidtab_sid_stats(struct sidtab *s, char *buf, int buflen) ;
ffbc92
     ^                               ~
ffbc92
                                     h
ffbc92
ffbc92
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
ffbc92
---
ffbc92
 libselinux/src/avc_sidtab.c | 6 +++---
ffbc92
 1 file changed, 3 insertions(+), 3 deletions(-)
ffbc92
ffbc92
diff --git a/libselinux/src/avc_sidtab.c b/libselinux/src/avc_sidtab.c
ffbc92
index 8c81cf65d2ef..f179d8558a45 100644
ffbc92
--- a/libselinux/src/avc_sidtab.c
ffbc92
+++ b/libselinux/src/avc_sidtab.c
ffbc92
@@ -100,7 +100,7 @@ sidtab_context_to_sid(struct sidtab *s,
ffbc92
 	return rc;
ffbc92
 }
ffbc92
 
ffbc92
-void sidtab_sid_stats(struct sidtab *h, char *buf, int buflen)
ffbc92
+void sidtab_sid_stats(struct sidtab *s, char *buf, int buflen)
ffbc92
 {
ffbc92
 	int i, chain_len, slots_used, max_chain_len;
ffbc92
 	struct sidtab_node *cur;
ffbc92
@@ -108,7 +108,7 @@ void sidtab_sid_stats(struct sidtab *h, char *buf, int buflen)
ffbc92
 	slots_used = 0;
ffbc92
 	max_chain_len = 0;
ffbc92
 	for (i = 0; i < SIDTAB_SIZE; i++) {
ffbc92
-		cur = h->htable[i];
ffbc92
+		cur = s->htable[i];
ffbc92
 		if (cur) {
ffbc92
 			slots_used++;
ffbc92
 			chain_len = 0;
ffbc92
@@ -124,7 +124,7 @@ void sidtab_sid_stats(struct sidtab *h, char *buf, int buflen)
ffbc92
 
ffbc92
 	snprintf(buf, buflen,
ffbc92
 		 "%s:  %u SID entries and %d/%d buckets used, longest "
ffbc92
-		 "chain length %d\n", avc_prefix, h->nel, slots_used,
ffbc92
+		 "chain length %d\n", avc_prefix, s->nel, slots_used,
ffbc92
 		 SIDTAB_SIZE, max_chain_len);
ffbc92
 }
ffbc92
 
ffbc92
-- 
ffbc92
2.32.0
ffbc92