diff options
author | Mark Salyzyn | 2015-08-20 12:01:44 -0500 |
---|---|---|
committer | Mark Salyzyn | 2015-08-20 12:32:16 -0500 |
commit | 73160acc5cb5236b30327569e6b51dbfe73e4a0f (patch) | |
tree | 8c8fcba4ddf27d22664913f08f38fe24a08f84eb /logd/LogBuffer.h | |
parent | decbcd9c418a4d076965971e74fd51fab497414b (diff) | |
download | platform-system-core-73160acc5cb5236b30327569e6b51dbfe73e4a0f.tar.gz platform-system-core-73160acc5cb5236b30327569e6b51dbfe73e4a0f.tar.xz platform-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.h | 8 |
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 @@ | |||
20 | #include <sys/types.h> | 20 | #include <sys/types.h> |
21 | 21 | ||
22 | #include <list> | 22 | #include <list> |
23 | #include <string> | ||
23 | 24 | ||
24 | #include <log/log.h> | 25 | #include <log/log.h> |
25 | #include <sysutils/SocketClient.h> | 26 | #include <sysutils/SocketClient.h> |
@@ -67,15 +68,14 @@ public: | |||
67 | int setSize(log_id_t id, unsigned long size); | 68 | int setSize(log_id_t id, unsigned long size); |
68 | unsigned long getSizeUsed(log_id_t id); | 69 | unsigned long getSizeUsed(log_id_t id); |
69 | // *strp uses malloc, use free to release. | 70 | // *strp uses malloc, use free to release. |
70 | void formatStatistics(char **strp, uid_t uid, unsigned int logMask); | 71 | std::string formatStatistics(uid_t uid, unsigned int logMask); |
71 | 72 | ||
72 | void enableStatistics() { | 73 | void enableStatistics() { |
73 | stats.enableStatistics(); | 74 | stats.enableStatistics(); |
74 | } | 75 | } |
75 | 76 | ||
76 | int initPrune(char *cp) { return mPrune.init(cp); } | 77 | int initPrune(const char *cp) { return mPrune.init(cp); } |
77 | // *strp uses malloc, use free to release. | 78 | std::string formatPrune() { return mPrune.format(); } |
78 | void formatPrune(char **strp) { mPrune.format(strp); } | ||
79 | 79 | ||
80 | // helper must be protected directly or implicitly by lock()/unlock() | 80 | // helper must be protected directly or implicitly by lock()/unlock() |
81 | char *pidToName(pid_t pid) { return stats.pidToName(pid); } | 81 | char *pidToName(pid_t pid) { return stats.pidToName(pid); } |