[apparmor] [PATCH 3/4] make some parameters of parser interface constant

John Johansen john.johansen at canonical.com
Tue Oct 6 17:14:59 UTC 2015


>From 27031aaa6a7880a8b5eb8a7db9ec7cc4022d77a3 Mon Sep 17 00:00:00 2001
From: John Johansen <john.johansen at canonical.com>
Date: Tue, 25 Aug 2015 04:41:28 -0700
Subject: [PATCH 3/4] make some parameters of parser interface constant

---
 parser/parser_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/parser/parser_interface.c b/parser/parser_interface.c
index 5d9e0a0..00a81f2 100644
--- a/parser/parser_interface.c
+++ b/parser/parser_interface.c
@@ -250,7 +250,7 @@ static inline void sd_write_name(std::ostringstream &buf, const char *name)
 	}
 }
 
-static inline void sd_write_blob(std::ostringstream &buf, void *b, int buf_size, char *name)
+static inline void sd_write_blob(std::ostringstream &buf, const void *b, int buf_size, const char *name)
 {
 	sd_write_name(buf, name);
 	sd_write8(buf, SD_BLOB);
@@ -273,7 +273,7 @@ static inline void sd_write_aligned_blob(std::ostringstream &buf, void *b, int b
 	buf.write((const char *) b, b_size);
 }
 
-static void sd_write_strn(std::ostringstream &buf, char *b, int size, const char *name)
+static void sd_write_strn(std::ostringstream &buf, const char *b, int size, const char *name)
 {
 	sd_write_name(buf, name);
 	sd_write8(buf, SD_STRING);
@@ -281,7 +281,7 @@ static void sd_write_strn(std::ostringstream &buf, char *b, int size, const char
 	buf.write(b, size);
 }
 
-static inline void sd_write_string(std::ostringstream &buf, char *b, const char *name)
+static inline void sd_write_string(std::ostringstream &buf, const char *b, const char *name)
 {
 	sd_write_strn(buf, b, strlen(b) + 1, name);
 }
-- 
2.1.4





More information about the AppArmor mailing list