Further conservation of newlines.
Friends don't let friends end LOG() strings with newlines.
Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
diff --git a/vm/hprof/Hprof.cpp b/vm/hprof/Hprof.cpp
index 18439b3..ff8e872 100644
--- a/vm/hprof/Hprof.cpp
+++ b/vm/hprof/Hprof.cpp
@@ -43,7 +43,7 @@
hprof_context_t *ctx = (hprof_context_t *)malloc(sizeof(*ctx));
if (ctx == NULL) {
- LOGE("hprof: can't allocate context.\n");
+ LOGE("hprof: can't allocate context.");
return NULL;
}
@@ -69,14 +69,14 @@
*/
hprof_context_t *headCtx = (hprof_context_t *)malloc(sizeof(*headCtx));
if (headCtx == NULL) {
- LOGE("hprof: can't allocate context.\n");
+ LOGE("hprof: can't allocate context.");
hprofFreeContext(tailCtx);
return false;
}
hprofContextInit(headCtx, strdup(tailCtx->fileName), tailCtx->fd, true,
tailCtx->directToDdms);
- LOGI("hprof: dumping heap strings to \"%s\".\n", tailCtx->fileName);
+ LOGI("hprof: dumping heap strings to \"%s\".", tailCtx->fileName);
hprofDumpStrings(headCtx);
hprofDumpClasses(headCtx);
@@ -115,13 +115,13 @@
if (headCtx->fd >= 0) {
outFd = dup(headCtx->fd);
if (outFd < 0) {
- LOGE("dup(%d) failed: %s\n", headCtx->fd, strerror(errno));
+ LOGE("dup(%d) failed: %s", headCtx->fd, strerror(errno));
/* continue to fail-handler below */
}
} else {
outFd = open(tailCtx->fileName, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (outFd < 0) {
- LOGE("can't open %s: %s\n", headCtx->fileName, strerror(errno));
+ LOGE("can't open %s: %s", headCtx->fileName, strerror(errno));
/* continue to fail-handler below */
}
}
@@ -145,7 +145,7 @@
}
/* throw out a log message for the benefit of "runhat" */
- LOGI("hprof: heap dump completed (%dKB)\n",
+ LOGI("hprof: heap dump completed (%dKB)",
(headCtx->fileDataSize + tailCtx->fileDataSize + 1023) / 1024);
hprofFreeContext(headCtx);