Skip to content

Commit

Permalink
merge from open-source master
Browse files Browse the repository at this point in the history
Change-Id: I8e7903bcd3fe7ddf88b63462dc9123f12b779c64
  • Loading branch information
The Android Open Source Project committed May 12, 2010
2 parents 25ffaff + 28a8dab commit d00eba4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logwrapper/logwrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ void parent(const char *tag, int seg_fault_on_exit, int parent_read) {
buffer[b] = '\0';
} else if (buffer[b] == '\n') {
buffer[b] = '\0';
LOG(LOG_INFO, tag, &buffer[a]);
LOG(LOG_INFO, tag, "%s", &buffer[a]);
a = b + 1;
}
}

if (a == 0 && b == sizeof(buffer) - 1) {
// buffer is full, flush
buffer[b] = '\0';
LOG(LOG_INFO, tag, &buffer[a]);
LOG(LOG_INFO, tag, "%s", &buffer[a]);
b = 0;
} else if (a != b) {
// Keep left-overs
Expand All @@ -84,7 +84,7 @@ void parent(const char *tag, int seg_fault_on_exit, int parent_read) {
// Flush remaining data
if (a != b) {
buffer[b] = '\0';
LOG(LOG_INFO, tag, &buffer[a]);
LOG(LOG_INFO, tag, "%s", &buffer[a]);
}
status = 0xAAAA;
if (wait(&status) != -1) { // Wait for child
Expand Down

0 comments on commit d00eba4

Please sign in to comment.