aboutsummaryrefslogtreecommitdiff
path: root/toys/android
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-11-17 18:25:08 -0600
committerRob Landley <rob@landley.net>2018-11-17 18:25:08 -0600
commit503e6362290d56bce0ed71f8164f24e25108bbbc (patch)
tree06d962fb5a547aa07f387d879cb28ff84fd23b78 /toys/android
parent7d26f1071d17dc2980280008fbbcd8a6a376d387 (diff)
downloadtoybox-503e6362290d56bce0ed71f8164f24e25108bbbc.tar.gz
Convert more GLOBALS argument vars to the new single letter code style.
Diffstat (limited to 'toys/android')
-rw-r--r--toys/android/log.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/toys/android/log.c b/toys/android/log.c
index 09e36d7b..f9545ab8 100644
--- a/toys/android/log.c
+++ b/toys/android/log.c
@@ -22,8 +22,7 @@ config LOG
#include "toys.h"
GLOBALS(
- char *tag;
- char *pri;
+ char *t, *p;
)
void log_main(void)
@@ -32,14 +31,14 @@ void log_main(void)
char *s = toybuf;
int i;
- if (TT.pri) {
- i = stridx("defisvw", tolower(*TT.pri));
- if (i==-1 || strlen(TT.pri)!=1) error_exit("bad -p '%s'", TT.pri);
+ if (TT.p) {
+ i = stridx("defisvw", tolower(*TT.p));
+ if (i==-1 || strlen(TT.p)!=1) error_exit("bad -p '%s'", TT.p);
pri = (android_LogPriority []){ANDROID_LOG_DEBUG, ANDROID_LOG_ERROR,
ANDROID_LOG_FATAL, ANDROID_LOG_INFO, ANDROID_LOG_SILENT,
ANDROID_LOG_VERBOSE, ANDROID_LOG_WARN}[i];
}
- if (!TT.tag) TT.tag = "log";
+ if (!TT.t) TT.t = "log";
for (i = 0; toys.optargs[i]; i++) {
if (i) *s++ = ' ';
@@ -53,5 +52,5 @@ void log_main(void)
s = stpcpy(s, toys.optargs[i]);
}
- __android_log_write(pri, TT.tag, toybuf);
+ __android_log_write(pri, TT.t, toybuf);
}