- fagenrules: Validate new compiled rules - Add fapolicyd-cli --check-rules option Resolves: RHEL-169985 - Bump maximum length of a configuration file line Resolves: RHEL-157947
54 lines
1.3 KiB
Diff
54 lines
1.3 KiB
Diff
From 2e5487e7f8c257364977b30567120baee5471801 Mon Sep 17 00:00:00 2001
|
|
From: Petr Lautrbach <lautrbach@redhat.com>
|
|
Date: Mon, 20 Apr 2026 15:34:40 +0200
|
|
Subject: [PATCH] Drop unused lineno parameter/variable
|
|
Content-type: text/plain
|
|
|
|
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
|
|
---
|
|
src/cli/fapolicyd-cli.c | 9 ++++-----
|
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/cli/fapolicyd-cli.c b/src/cli/fapolicyd-cli.c
|
|
index a12797729a45..c6251518fcc8 100644
|
|
--- a/src/cli/fapolicyd-cli.c
|
|
+++ b/src/cli/fapolicyd-cli.c
|
|
@@ -128,12 +128,12 @@ struct mount_scan_state {
|
|
|
|
static struct mount_scan_state scan_state;
|
|
|
|
-static char *get_line(FILE *f, unsigned *lineno)
|
|
+static char *get_line(FILE *f)
|
|
{
|
|
char *line = NULL;
|
|
size_t len = 0;
|
|
|
|
- while (getline(&line, &len, f) != -1) {
|
|
+ if (getline(&line, &len, f) != -1) {
|
|
/* remove newline */
|
|
char *ptr = strchr(line, 0x0a);
|
|
if (ptr)
|
|
@@ -442,7 +442,7 @@ static int do_ftype(const char *path)
|
|
|
|
static int do_list(void)
|
|
{
|
|
- unsigned count = 1, lineno = 0;
|
|
+ unsigned count = 1;
|
|
FILE *f = fopen(OLD_RULES_FILE, "rm");
|
|
char *buf;
|
|
|
|
@@ -465,9 +465,8 @@ static int do_list(void)
|
|
}
|
|
}
|
|
|
|
- while ((buf = get_line(f, &lineno))) {
|
|
+ while ((buf = get_line(f))) {
|
|
char *str = buf;
|
|
- lineno++;
|
|
while (*str) {
|
|
if (!isblank(*str))
|
|
break;
|
|
--
|
|
2.53.0
|
|
|