54 lines
1.3 KiB
Diff
54 lines
1.3 KiB
Diff
From 25d5458a396a07e56f36f651da2c51b528fb293a Mon Sep 17 00:00:00 2001
|
|
From: Steve Grubb <ausearch.1@gmail.com>
|
|
Date: Thu, 2 Jan 2025 16:32:34 -0500
|
|
Subject: [PATCH] Fix a maybe uninitialized warning
|
|
|
|
Reference:https://github.com/linux-audit/audit-userspace/commit/25d5458a396a07e56f36f651da2c51b528fb293a
|
|
Conflict:NA
|
|
|
|
---
|
|
src/ausearch-parse.c | 9 +++------
|
|
1 file changed, 3 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/ausearch-parse.c b/src/ausearch-parse.c
|
|
index e15396d7..68e2b29e 100644
|
|
--- a/src/ausearch-parse.c
|
|
+++ b/src/ausearch-parse.c
|
|
@@ -1556,7 +1556,7 @@ static int parse_daemon1(const lnode *n, search_items *s)
|
|
if (str) {
|
|
ptr = str + 5;
|
|
term = strchr(ptr, ' ');
|
|
- if (term == NULL)
|
|
+ if (term == NULL)
|
|
return 7;
|
|
saved = *term;
|
|
*term = 0;
|
|
@@ -1565,13 +1565,11 @@ static int parse_daemon1(const lnode *n, search_items *s)
|
|
if (errno)
|
|
return 8;
|
|
*term = saved;
|
|
- } else
|
|
- term = ptr;
|
|
+ }
|
|
}
|
|
|
|
// ses - optional
|
|
if (event_session_id != -2) {
|
|
- ptr = term;
|
|
str = strstr(term, "ses=");
|
|
if (str) {
|
|
ptr = str + 4;
|
|
@@ -1585,8 +1583,7 @@ static int parse_daemon1(const lnode *n, search_items *s)
|
|
if (errno)
|
|
return 10;
|
|
*term = saved;
|
|
- } else
|
|
- term = ptr;
|
|
+ }
|
|
}
|
|
|
|
if (event_subject) {
|
|
--
|
|
2.33.0
|
|
|