Skip to content

Commit

Permalink
am d00eba4: merge from open-source master
Browse files Browse the repository at this point in the history
Merge commit 'd00eba458706a38f6c072ed90c5da35f3e3f1bba' into kraken

* commit 'd00eba458706a38f6c072ed90c5da35f3e3f1bba':
  Add a printf format.
  • Loading branch information
The Android Open Source Project authored and Android Git Automerger committed May 12, 2010
2 parents 42d3812 + d00eba4 commit 0253ffd
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 0253ffd

Please sign in to comment.