[apparmor] [PATCH 1/3] parser: Send PDEBUG() to stderr
Tyler Hicks
tyhicks at canonical.com
Fri Feb 27 23:37:10 UTC 2015
PDEBUG() and PERROR() should both go to stderr.
Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
---
parser/parser.h | 2 +-
parser/parser_misc.c | 2 +-
parser/parser_policy.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/parser/parser.h b/parser/parser.h
index da1b93d..8d43bfe 100644
--- a/parser/parser.h
+++ b/parser/parser.h
@@ -172,7 +172,7 @@ extern int preprocess_only;
#ifdef DEBUG
-#define PDEBUG(fmt, args...) printf("parser: " fmt, ## args)
+#define PDEBUG(fmt, args...) fprintf(stderr, "parser: " fmt, ## args)
#else
#define PDEBUG(fmt, args...) /* Do nothing */
#endif
diff --git a/parser/parser_misc.c b/parser/parser_misc.c
index d0b1f8d..fdd364a 100644
--- a/parser/parser_misc.c
+++ b/parser/parser_misc.c
@@ -43,7 +43,7 @@
/* #define DEBUG */
#ifdef DEBUG
#undef PDEBUG
-#define PDEBUG(fmt, args...) printf("Lexer: " fmt, ## args)
+#define PDEBUG(fmt, args...) fprintf(stderr, "Lexer: " fmt, ## args)
#else
#undef PDEBUG
#define PDEBUG(fmt, args...) /* Do nothing */
diff --git a/parser/parser_policy.c b/parser/parser_policy.c
index d941350..c27c790 100644
--- a/parser/parser_policy.c
+++ b/parser/parser_policy.c
@@ -34,7 +34,7 @@
/* #define DEBUG */
#ifdef DEBUG
-#define PDEBUG(fmt, args...) printf("Lexer: " fmt, ## args)
+#define PDEBUG(fmt, args...) fprintf(stderr, "Lexer: " fmt, ## args)
#else
#define PDEBUG(fmt, args...) /* Do nothing */
#endif
--
2.1.4
More information about the AppArmor
mailing list