just iterate over the string instead, it's much simpler and doesn't use a
glibc extension.

Signed-off-by: Tycho Andersen <[email protected]>
---
 auparse/interpret.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/auparse/interpret.c b/auparse/interpret.c
index 1f517d7..57da00c 100644
--- a/auparse/interpret.c
+++ b/auparse/interpret.c
@@ -803,10 +803,9 @@ static const char *print_proctitle(const char *val)
                size_t len = strlen(val) / 2;
                const char *end = out + len;
                char *ptr = out;
-               while ((ptr  = rawmemchr(ptr, '\0'))) {
-                       if (ptr >= end)
-                               break;
-                       *ptr = ' ';
+               while (ptr < end) {
+                       if (*ptr == '\0')
+                               *ptr = ' ';
                        ptr++;
                }
        }
-- 
2.9.3

--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit

Reply via email to