summaryrefslogtreecommitdiffstats
path: root/logd/LogBuffer.h
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-08-20 10:01:44 -0700
committerMark Salyzyn <salyzyn@google.com>2015-08-20 10:32:16 -0700
commit73160acc5cb5236b30327569e6b51dbfe73e4a0f (patch)
tree8c8fcba4ddf27d22664913f08f38fe24a08f84eb /logd/LogBuffer.h
parentdecbcd9c418a4d076965971e74fd51fab497414b (diff)
downloadsystem_core-73160acc5cb5236b30327569e6b51dbfe73e4a0f.tar.gz
system_core-73160acc5cb5236b30327569e6b51dbfe73e4a0f.tar.bz2
system_core-73160acc5cb5236b30327569e6b51dbfe73e4a0f.zip
logd: switch asprintf to std::string
Bug: 23350706 Change-Id: I715cdd4563a09de3680081947a3439f0cac623be
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r--logd/LogBuffer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h
index e94598c82..fcb05f597 100644
--- a/logd/LogBuffer.h
+++ b/logd/LogBuffer.h
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <list>
+#include <string>
#include <log/log.h>
#include <sysutils/SocketClient.h>
@@ -67,15 +68,14 @@ public:
int setSize(log_id_t id, unsigned long size);
unsigned long getSizeUsed(log_id_t id);
// *strp uses malloc, use free to release.
- void formatStatistics(char **strp, uid_t uid, unsigned int logMask);
+ std::string formatStatistics(uid_t uid, unsigned int logMask);
void enableStatistics() {
stats.enableStatistics();
}
- int initPrune(char *cp) { return mPrune.init(cp); }
- // *strp uses malloc, use free to release.
- void formatPrune(char **strp) { mPrune.format(strp); }
+ int initPrune(const char *cp) { return mPrune.init(cp); }
+ std::string formatPrune() { return mPrune.format(); }
// helper must be protected directly or implicitly by lock()/unlock()
char *pidToName(pid_t pid) { return stats.pidToName(pid); }