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:
@@ -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.
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user