summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2017-03-08 17:03:20 -0600
committerMark Salyzyn2017-03-09 11:36:34 -0600
commit04bbc8ea4584b14c21e0c63f8dc4c6b4beb7bd47 (patch)
treee906eca16f222fc43c8a0e848bc3fdda0461560b /liblog/stderr_write.c
parent2ed51d708eda64516ec79ac6397f690de38f0075 (diff)
downloadplatform-system-core-04bbc8ea4584b14c21e0c63f8dc4c6b4beb7bd47.tar.gz
platform-system-core-04bbc8ea4584b14c21e0c63f8dc4c6b4beb7bd47.tar.xz
platform-system-core-04bbc8ea4584b14c21e0c63f8dc4c6b4beb7bd47.zip
liblog: stay away from C++ keyword private
Replace with void* private with priv in context structure. SideEffects: None Test: gTest liblog-unit-tests Bug: 27405083 Change-Id: I670cb0b7fb2f3085ea13b4ac836d84239a3c8572
Diffstat (limited to 'liblog/stderr_write.c')
-rw-r--r--liblog/stderr_write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/liblog/stderr_write.c b/liblog/stderr_write.c
index 291ce9322..dbe5309da 100644
--- a/liblog/stderr_write.c
+++ b/liblog/stderr_write.c
@@ -57,7 +57,7 @@ struct stderrContext {
57 57
58LIBLOG_HIDDEN struct android_log_transport_write stderrLoggerWrite = { 58LIBLOG_HIDDEN struct android_log_transport_write stderrLoggerWrite = {
59 .node = { &stderrLoggerWrite.node, &stderrLoggerWrite.node }, 59 .node = { &stderrLoggerWrite.node, &stderrLoggerWrite.node },
60 .context.private = NULL, 60 .context.priv = NULL,
61 .name = "stderr", 61 .name = "stderr",
62 .available = stderrAvailable, 62 .available = stderrAvailable,
63 .open = stderrOpen, 63 .open = stderrOpen,
@@ -74,7 +74,7 @@ static int stderrOpen() {
74 return -EBADF; 74 return -EBADF;
75 } 75 }
76 76
77 if (stderrLoggerWrite.context.private) { 77 if (stderrLoggerWrite.context.priv) {
78 return fileno(stderr); 78 return fileno(stderr);
79 } 79 }
80 80
@@ -117,16 +117,16 @@ static int stderrOpen() {
117 if (envStr) { 117 if (envStr) {
118 android_log_addFilterString(ctx->logformat, envStr); 118 android_log_addFilterString(ctx->logformat, envStr);
119 } 119 }
120 stderrLoggerWrite.context.private = ctx; 120 stderrLoggerWrite.context.priv = ctx;
121 121
122 return fileno(stderr); 122 return fileno(stderr);
123} 123}
124 124
125static void stderrClose() { 125static void stderrClose() {
126 struct stderrContext* ctx = stderrLoggerWrite.context.private; 126 struct stderrContext* ctx = stderrLoggerWrite.context.priv;
127 127
128 if (ctx) { 128 if (ctx) {
129 stderrLoggerWrite.context.private = NULL; 129 stderrLoggerWrite.context.priv = NULL;
130 if (ctx->logformat) { 130 if (ctx->logformat) {
131 android_log_format_free(ctx->logformat); 131 android_log_format_free(ctx->logformat);
132 ctx->logformat = NULL; 132 ctx->logformat = NULL;
@@ -154,7 +154,7 @@ static int stderrWrite(log_id_t logId, struct timespec* ts, struct iovec* vec,
154 char binaryMsgBuf[1024]; 154 char binaryMsgBuf[1024];
155 int err; 155 int err;
156 size_t i; 156 size_t i;
157 struct stderrContext* ctx = stderrLoggerWrite.context.private; 157 struct stderrContext* ctx = stderrLoggerWrite.context.priv;
158 158
159 if (!ctx) return -EBADF; 159 if (!ctx) return -EBADF;
160 if (!vec || !nr) return -EINVAL; 160 if (!vec || !nr) return -EINVAL;