summaryrefslogtreecommitdiffstats
path: root/logcat
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-09-30 17:10:14 -0700
committerKenny Root <kroot@google.com>2011-10-03 14:14:41 -0700
commit4bf3c02e026077d14a4512c7c2f71937da3c2d50 (patch)
tree7fd7c515c75cc0f64d9be5351be46f7d767e5794 /logcat
parente5de9ee4915bafd7f31a96260613d8b93aba8351 (diff)
downloadsystem_core-4bf3c02e026077d14a4512c7c2f71937da3c2d50.zip
system_core-4bf3c02e026077d14a4512c7c2f71937da3c2d50.tar.gz
system_core-4bf3c02e026077d14a4512c7c2f71937da3c2d50.tar.bz2
Add checking for log entry format
The log tag may be zero length if corrupted, so check for this condition. Change-Id: I7616226dabe78a85859b0ab53aca08f734dbdd84
Diffstat (limited to 'logcat')
-rw-r--r--logcat/logcat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index 96b68ef..4cd2151 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -323,7 +323,7 @@ static void readLogLines(log_device_t* devices)
// the caller requested to just dump the log and exit
if (g_nonblock) {
- exit(0);
+ return;
}
} else {
// print all that aren't the last in their list
@@ -765,10 +765,10 @@ int main(int argc, char **argv)
}
if (getLogSize) {
- return 0;
+ exit(0);
}
if (clearLog) {
- return 0;
+ exit(0);
}
//LOG_EVENT_INT(10, 12345);