2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

Make parse_record take a const char pointer since it never modified str anyways

This shouldn't be a breaking change because it's fine to pass a
non-const pointer to a function taking a const pointer, but not the other way round

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
(cherry picked from commit 78f138c37f)
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
Ryan Lee
2024-09-05 10:40:53 -07:00
parent a6b9fc49d2
commit 43c759afc6
3 changed files with 3 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ typedef struct
* @return Parsed data.
*/
aa_log_record *
parse_record(char *str);
parse_record(const char *str);
/**
* Frees all struct data.

View File

@@ -38,7 +38,7 @@
#include "scanner.h"
/* This is mostly just a wrapper around the code in grammar.y */
aa_log_record *parse_record(char *str)
aa_log_record *parse_record(const char *str)
{
YY_BUFFER_STATE lex_buf;
yyscan_t scanner;

View File

@@ -81,7 +81,7 @@ int aa_log_record_eq(aa_log_record *record1, aa_log_record *record2) {
}
typedef struct {
char* log;
const char* log;
pthread_barrier_t *barrier;
} pthread_parse_args;