summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--liblog/include/private/android_logger.h2
-rw-r--r--logd/CommandListener.cpp6
-rw-r--r--logd/FlushCommand.cpp2
-rw-r--r--logd/LogAudit.cpp12
-rw-r--r--logd/LogBufferElement.cpp16
-rw-r--r--logd/LogCommand.cpp6
-rw-r--r--logd/LogListener.cpp8
-rw-r--r--logd/LogStatistics.cpp6
-rw-r--r--logd/LogTags.cpp24
-rw-r--r--logd/LogTags.h4
-rw-r--r--logd/LogWhiteBlackList.cpp4
11 files changed, 45 insertions, 45 deletions
diff --git a/liblog/include/private/android_logger.h b/liblog/include/private/android_logger.h
index 965de375c..b927b4677 100644
--- a/liblog/include/private/android_logger.h
+++ b/liblog/include/private/android_logger.h
@@ -173,7 +173,7 @@ class __android_log_event_list : public android_log_event_list {
173#if defined(_USING_LIBCXX) 173#if defined(_USING_LIBCXX)
174 operator std::string() { 174 operator std::string() {
175 if (ret) return std::string(""); 175 if (ret) return std::string("");
176 const char* cp = NULL; 176 const char* cp = nullptr;
177 ssize_t len = android_log_write_list_buffer(ctx, &cp); 177 ssize_t len = android_log_write_list_buffer(ctx, &cp);
178 if (len < 0) ret = len; 178 if (len < 0) ret = len;
179 if (!cp || (len <= 0)) return std::string(""); 179 if (!cp || (len <= 0)) return std::string("");
diff --git a/logd/CommandListener.cpp b/logd/CommandListener.cpp
index 06c0ab5fe..7a843d8b6 100644
--- a/logd/CommandListener.cpp
+++ b/logd/CommandListener.cpp
@@ -288,9 +288,9 @@ int CommandListener::GetEventTagCmd::runCommand(SocketClient* cli, int argc,
288 uid = AID_ROOT; 288 uid = AID_ROOT;
289 } 289 }
290 290
291 const char* name = NULL; 291 const char* name = nullptr;
292 const char* format = NULL; 292 const char* format = nullptr;
293 const char* id = NULL; 293 const char* id = nullptr;
294 for (int i = 1; i < argc; ++i) { 294 for (int i = 1; i < argc; ++i) {
295 static const char _name[] = "name="; 295 static const char _name[] = "name=";
296 if (!strncmp(argv[i], _name, strlen(_name))) { 296 if (!strncmp(argv[i], _name, strlen(_name))) {
diff --git a/logd/FlushCommand.cpp b/logd/FlushCommand.cpp
index 70ecbe0a5..658e079a5 100644
--- a/logd/FlushCommand.cpp
+++ b/logd/FlushCommand.cpp
@@ -36,7 +36,7 @@
36// reference counts are used to ensure that individual 36// reference counts are used to ensure that individual
37// LogTimeEntry lifetime is managed when not protected. 37// LogTimeEntry lifetime is managed when not protected.
38void FlushCommand::runSocketCommand(SocketClient* client) { 38void FlushCommand::runSocketCommand(SocketClient* client) {
39 LogTimeEntry* entry = NULL; 39 LogTimeEntry* entry = nullptr;
40 LastLogTimes& times = mReader.logbuf().mTimes; 40 LastLogTimes& times = mReader.logbuf().mTimes;
41 41
42 LogTimeEntry::wrlock(); 42 LogTimeEntry::wrlock();
diff --git a/logd/LogAudit.cpp b/logd/LogAudit.cpp
index 27cd9a8cc..4ea787791 100644
--- a/logd/LogAudit.cpp
+++ b/logd/LogAudit.cpp
@@ -171,13 +171,13 @@ void LogAudit::auditParse(const std::string& string, uid_t uid,
171} 171}
172 172
173int LogAudit::logPrint(const char* fmt, ...) { 173int LogAudit::logPrint(const char* fmt, ...) {
174 if (fmt == NULL) { 174 if (fmt == nullptr) {
175 return -EINVAL; 175 return -EINVAL;
176 } 176 }
177 177
178 va_list args; 178 va_list args;
179 179
180 char* str = NULL; 180 char* str = nullptr;
181 va_start(args, fmt); 181 va_start(args, fmt);
182 int rc = vasprintf(&str, fmt, args); 182 int rc = vasprintf(&str, fmt, args);
183 va_end(args); 183 va_end(args);
@@ -228,7 +228,7 @@ int LogAudit::logPrint(const char* fmt, ...) {
228 static char* last_str; 228 static char* last_str;
229 static bool last_info; 229 static bool last_info;
230 230
231 if (last_str != NULL) { 231 if (last_str != nullptr) {
232 static const char avc[] = "): avc: "; 232 static const char avc[] = "): avc: ";
233 char* avcl = strstr(last_str, avc); 233 char* avcl = strstr(last_str, avc);
234 bool skip = false; 234 bool skip = false;
@@ -265,10 +265,10 @@ int LogAudit::logPrint(const char* fmt, ...) {
265 265
266 writev(fdDmesg, iov, arraysize(iov)); 266 writev(fdDmesg, iov, arraysize(iov));
267 free(last_str); 267 free(last_str);
268 last_str = NULL; 268 last_str = nullptr;
269 } 269 }
270 } 270 }
271 if (last_str == NULL) { 271 if (last_str == nullptr) {
272 count = 0; 272 count = 0;
273 last_str = strdup(str); 273 last_str = strdup(str);
274 last_info = info; 274 last_info = info;
@@ -357,7 +357,7 @@ int LogAudit::logPrint(const char* fmt, ...) {
357 static const char comm_str[] = " comm=\""; 357 static const char comm_str[] = " comm=\"";
358 const char* comm = strstr(str, comm_str); 358 const char* comm = strstr(str, comm_str);
359 const char* estr = str + strlen(str); 359 const char* estr = str + strlen(str);
360 const char* commfree = NULL; 360 const char* commfree = nullptr;
361 if (comm) { 361 if (comm) {
362 estr = comm; 362 estr = comm;
363 comm += sizeof(comm_str) - 1; 363 comm += sizeof(comm_str) - 1;
diff --git a/logd/LogBufferElement.cpp b/logd/LogBufferElement.cpp
index f20ac4514..2d627b957 100644
--- a/logd/LogBufferElement.cpp
+++ b/logd/LogBufferElement.cpp
@@ -91,7 +91,7 @@ unsigned short LogBufferElement::setDropped(unsigned short value) {
91 91
92// caller must own and free character string 92// caller must own and free character string
93char* android::tidToName(pid_t tid) { 93char* android::tidToName(pid_t tid) {
94 char* retval = NULL; 94 char* retval = nullptr;
95 char buffer[256]; 95 char buffer[256];
96 snprintf(buffer, sizeof(buffer), "/proc/%u/comm", tid); 96 snprintf(buffer, sizeof(buffer), "/proc/%u/comm", tid);
97 int fd = open(buffer, O_RDONLY); 97 int fd = open(buffer, O_RDONLY);
@@ -114,7 +114,7 @@ char* android::tidToName(pid_t tid) {
114 char* name = android::pidToName(tid); 114 char* name = android::pidToName(tid);
115 if (!retval) { 115 if (!retval) {
116 retval = name; 116 retval = name;
117 name = NULL; 117 name = nullptr;
118 } 118 }
119 119
120 // check if comm is truncated, see if cmdline has full representation 120 // check if comm is truncated, see if cmdline has full representation
@@ -162,15 +162,15 @@ size_t LogBufferElement::populateDroppedMessage(char*& buffer, LogBuffer* parent
162 if (!strncmp(name + 1, commName + 1, len)) { 162 if (!strncmp(name + 1, commName + 1, len)) {
163 if (commName[len + 1] == '\0') { 163 if (commName[len + 1] == '\0') {
164 free(const_cast<char*>(commName)); 164 free(const_cast<char*>(commName));
165 commName = NULL; 165 commName = nullptr;
166 } else { 166 } else {
167 free(const_cast<char*>(name)); 167 free(const_cast<char*>(name));
168 name = NULL; 168 name = nullptr;
169 } 169 }
170 } 170 }
171 } 171 }
172 if (name) { 172 if (name) {
173 char* buf = NULL; 173 char* buf = nullptr;
174 asprintf(&buf, "(%s)", name); 174 asprintf(&buf, "(%s)", name);
175 if (buf) { 175 if (buf) {
176 free(const_cast<char*>(name)); 176 free(const_cast<char*>(name));
@@ -178,7 +178,7 @@ size_t LogBufferElement::populateDroppedMessage(char*& buffer, LogBuffer* parent
178 } 178 }
179 } 179 }
180 if (commName) { 180 if (commName) {
181 char* buf = NULL; 181 char* buf = nullptr;
182 asprintf(&buf, " %s", commName); 182 asprintf(&buf, " %s", commName);
183 if (buf) { 183 if (buf) {
184 free(const_cast<char*>(commName)); 184 free(const_cast<char*>(commName));
@@ -187,7 +187,7 @@ size_t LogBufferElement::populateDroppedMessage(char*& buffer, LogBuffer* parent
187 } 187 }
188 // identical to below to calculate the buffer size required 188 // identical to below to calculate the buffer size required
189 const char* type = lastSame ? "identical" : "expire"; 189 const char* type = lastSame ? "identical" : "expire";
190 size_t len = snprintf(NULL, 0, format_uid, mUid, name ? name : "", 190 size_t len = snprintf(nullptr, 0, format_uid, mUid, name ? name : "",
191 commName ? commName : "", type, getDropped(), 191 commName ? commName : "", type, getDropped(),
192 (getDropped() > 1) ? "s" : ""); 192 (getDropped() > 1) ? "s" : "");
193 193
@@ -247,7 +247,7 @@ log_time LogBufferElement::flushTo(SocketClient* reader, LogBuffer* parent,
247 iovec[0].iov_base = &entry; 247 iovec[0].iov_base = &entry;
248 iovec[0].iov_len = entry.hdr_size; 248 iovec[0].iov_len = entry.hdr_size;
249 249
250 char* buffer = NULL; 250 char* buffer = nullptr;
251 251
252 if (mDropped) { 252 if (mDropped) {
253 entry.len = populateDroppedMessage(buffer, parent, lastSame); 253 entry.len = populateDroppedMessage(buffer, parent, lastSame);
diff --git a/logd/LogCommand.cpp b/logd/LogCommand.cpp
index 6d7c0a5dc..8bff9da46 100644
--- a/logd/LogCommand.cpp
+++ b/logd/LogCommand.cpp
@@ -44,9 +44,9 @@ static bool groupIsLog(char* buf) {
44 char* ptr; 44 char* ptr;
45 static const char ws[] = " \n"; 45 static const char ws[] = " \n";
46 46
47 for (buf = strtok_r(buf, ws, &ptr); buf; buf = strtok_r(NULL, ws, &ptr)) { 47 for (buf = strtok_r(buf, ws, &ptr); buf; buf = strtok_r(nullptr, ws, &ptr)) {
48 errno = 0; 48 errno = 0;
49 gid_t Gid = strtol(buf, NULL, 10); 49 gid_t Gid = strtol(buf, nullptr, 10);
50 if (errno != 0) { 50 if (errno != 0) {
51 return false; 51 return false;
52 } 52 }
@@ -98,7 +98,7 @@ bool clientHasLogCredentials(uid_t uid, gid_t gid, pid_t pid) {
98 continue; 98 continue;
99 } 99 }
100 100
101 char* line = NULL; 101 char* line = nullptr;
102 size_t len = 0; 102 size_t len = 0;
103 while (getline(&line, &len, file) > 0) { 103 while (getline(&line, &len, file) > 0) {
104 static const char groups_string[] = "Groups:\t"; 104 static const char groups_string[] = "Groups:\t";
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp
index fc51dcf08..e568ddcf4 100644
--- a/logd/LogListener.cpp
+++ b/logd/LogListener.cpp
@@ -50,7 +50,7 @@ bool LogListener::onDataAvailable(SocketClient* cli) {
50 50
51 alignas(4) char control[CMSG_SPACE(sizeof(struct ucred))]; 51 alignas(4) char control[CMSG_SPACE(sizeof(struct ucred))];
52 struct msghdr hdr = { 52 struct msghdr hdr = {
53 NULL, 0, &iov, 1, control, sizeof(control), 0, 53 nullptr, 0, &iov, 1, control, sizeof(control), 0,
54 }; 54 };
55 55
56 int socket = cli->getSocket(); 56 int socket = cli->getSocket();
@@ -66,10 +66,10 @@ bool LogListener::onDataAvailable(SocketClient* cli) {
66 66
67 buffer[n] = 0; 67 buffer[n] = 0;
68 68
69 struct ucred* cred = NULL; 69 struct ucred* cred = nullptr;
70 70
71 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr); 71 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&hdr);
72 while (cmsg != NULL) { 72 while (cmsg != nullptr) {
73 if (cmsg->cmsg_level == SOL_SOCKET && 73 if (cmsg->cmsg_level == SOL_SOCKET &&
74 cmsg->cmsg_type == SCM_CREDENTIALS) { 74 cmsg->cmsg_type == SCM_CREDENTIALS) {
75 cred = (struct ucred*)CMSG_DATA(cmsg); 75 cred = (struct ucred*)CMSG_DATA(cmsg);
@@ -79,7 +79,7 @@ bool LogListener::onDataAvailable(SocketClient* cli) {
79 } 79 }
80 80
81 struct ucred fake_cred; 81 struct ucred fake_cred;
82 if (cred == NULL) { 82 if (cred == nullptr) {
83 cred = &fake_cred; 83 cred = &fake_cred;
84 cred->pid = 0; 84 cred->pid = 0;
85 cred->uid = DEFAULT_OVERFLOWUID; 85 cred->uid = DEFAULT_OVERFLOWUID;
diff --git a/logd/LogStatistics.cpp b/logd/LogStatistics.cpp
index af59ddc25..cefacf775 100644
--- a/logd/LogStatistics.cpp
+++ b/logd/LogStatistics.cpp
@@ -56,7 +56,7 @@ size_t sizesTotal() {
56 56
57// caller must own and free character string 57// caller must own and free character string
58char* pidToName(pid_t pid) { 58char* pidToName(pid_t pid) {
59 char* retval = NULL; 59 char* retval = nullptr;
60 if (pid == 0) { // special case from auditd/klogd for kernel 60 if (pid == 0) { // special case from auditd/klogd for kernel
61 retval = strdup("logd"); 61 retval = strdup("logd");
62 } else { 62 } else {
@@ -286,7 +286,7 @@ const char* LogStatistics::uidToName(uid_t uid) const {
286 name = strdup(nameTmp); 286 name = strdup(nameTmp);
287 } else if (fastcmp<strcmp>(name, nameTmp)) { 287 } else if (fastcmp<strcmp>(name, nameTmp)) {
288 free(const_cast<char*>(name)); 288 free(const_cast<char*>(name));
289 name = NULL; 289 name = nullptr;
290 break; 290 break;
291 } 291 }
292 } 292 }
@@ -872,7 +872,7 @@ const char* LogStatistics::pidToName(pid_t pid) const {
872 pidTable_t& writablePidTable = const_cast<pidTable_t&>(pidTable); 872 pidTable_t& writablePidTable = const_cast<pidTable_t&>(pidTable);
873 const char* name = writablePidTable.add(pid)->second.getName(); 873 const char* name = writablePidTable.add(pid)->second.getName();
874 if (!name) { 874 if (!name) {
875 return NULL; 875 return nullptr;
876 } 876 }
877 return strdup(name); 877 return strdup(name);
878} 878}
diff --git a/logd/LogTags.cpp b/logd/LogTags.cpp
index ff7e76258..1ab9dd1b6 100644
--- a/logd/LogTags.cpp
+++ b/logd/LogTags.cpp
@@ -91,7 +91,7 @@ bool LogTags::RebuildFileEventLogTags(const char* filename, bool warn) {
91 fd = TEMP_FAILURE_RETRY(open( 91 fd = TEMP_FAILURE_RETRY(open(
92 filename, O_WRONLY | O_TRUNC | O_CLOEXEC | O_NOFOLLOW | O_BINARY)); 92 filename, O_WRONLY | O_TRUNC | O_CLOEXEC | O_NOFOLLOW | O_BINARY));
93 if (fd >= 0) { 93 if (fd >= 0) {
94 time_t now = time(NULL); 94 time_t now = time(nullptr);
95 struct tm tm; 95 struct tm tm;
96 localtime_r(&now, &tm); 96 localtime_r(&now, &tm);
97 char timebuf[20]; 97 char timebuf[20];
@@ -208,7 +208,7 @@ void LogTags::ReadFileEventLogTags(const char* filename, bool warn) {
208 } else if (lineStart) { 208 } else if (lineStart) {
209 if (*cp == '#') { 209 if (*cp == '#') {
210 /* comment; just scan to end */ 210 /* comment; just scan to end */
211 lineStart = NULL; 211 lineStart = nullptr;
212 } else if (isdigit(*cp)) { 212 } else if (isdigit(*cp)) {
213 unsigned long Tag = strtoul(cp, &cp, 10); 213 unsigned long Tag = strtoul(cp, &cp, 10);
214 if (warn && (Tag > emptyTag)) { 214 if (warn && (Tag > emptyTag)) {
@@ -235,7 +235,7 @@ void LogTags::ReadFileEventLogTags(const char* filename, bool warn) {
235 if (hasAlpha && 235 if (hasAlpha &&
236 ((cp >= endp) || (*cp == '#') || isspace(*cp))) { 236 ((cp >= endp) || (*cp == '#') || isspace(*cp))) {
237 if (Tag > emptyTag) { 237 if (Tag > emptyTag) {
238 if (*cp != '\n') lineStart = NULL; 238 if (*cp != '\n') lineStart = nullptr;
239 continue; 239 continue;
240 } 240 }
241 while ((cp < endp) && (*cp != '\n') && isspace(*cp)) 241 while ((cp < endp) && (*cp != '\n') && isspace(*cp))
@@ -245,14 +245,14 @@ void LogTags::ReadFileEventLogTags(const char* filename, bool warn) {
245 while ((cp < endp) && (*cp != '\n')) { 245 while ((cp < endp) && (*cp != '\n')) {
246 if (*cp == '#') { 246 if (*cp == '#') {
247 uid = sniffUid(cp, endp); 247 uid = sniffUid(cp, endp);
248 lineStart = NULL; 248 lineStart = nullptr;
249 break; 249 break;
250 } 250 }
251 ++cp; 251 ++cp;
252 } 252 }
253 while ((cp > format) && isspace(cp[-1])) { 253 while ((cp > format) && isspace(cp[-1])) {
254 --cp; 254 --cp;
255 lineStart = NULL; 255 lineStart = nullptr;
256 } 256 }
257 std::string Format(format, cp - format); 257 std::string Format(format, cp - format);
258 258
@@ -263,7 +263,7 @@ void LogTags::ReadFileEventLogTags(const char* filename, bool warn) {
263 android::prdebug("tag name invalid %.*s", 263 android::prdebug("tag name invalid %.*s",
264 (int)(cp - name + 1), name); 264 (int)(cp - name + 1), name);
265 } 265 }
266 lineStart = NULL; 266 lineStart = nullptr;
267 } 267 }
268 } else if (!isspace(*cp)) { 268 } else if (!isspace(*cp)) {
269 break; 269 break;
@@ -364,7 +364,7 @@ const char* LogTags::tagToName(uint32_t tag) const {
364 android::RWLock::AutoRLock readLock(const_cast<android::RWLock&>(rwlock)); 364 android::RWLock::AutoRLock readLock(const_cast<android::RWLock&>(rwlock));
365 365
366 it = tag2name.find(tag); 366 it = tag2name.find(tag);
367 if ((it == tag2name.end()) || (it->second.length() == 0)) return NULL; 367 if ((it == tag2name.end()) || (it->second.length() == 0)) return nullptr;
368 368
369 return it->second.c_str(); 369 return it->second.c_str();
370} 370}
@@ -383,7 +383,7 @@ const char* LogTags::tagToName(uint32_t tag) const {
383const char* android::tagToName(uint32_t tag) { 383const char* android::tagToName(uint32_t tag) {
384 LogTags* me = logtags; 384 LogTags* me = logtags;
385 385
386 if (!me) return NULL; 386 if (!me) return nullptr;
387 me->WritePmsgEventLogTags(tag); 387 me->WritePmsgEventLogTags(tag);
388 return me->tagToName(tag); 388 return me->tagToName(tag);
389} 389}
@@ -412,7 +412,7 @@ const char* LogTags::tagToFormat(uint32_t tag) const {
412 android::RWLock::AutoRLock readLock(const_cast<android::RWLock&>(rwlock)); 412 android::RWLock::AutoRLock readLock(const_cast<android::RWLock&>(rwlock));
413 413
414 iform = tag2format.find(tag); 414 iform = tag2format.find(tag);
415 if (iform == tag2format.end()) return NULL; 415 if (iform == tag2format.end()) return nullptr;
416 416
417 return iform->second.c_str(); 417 return iform->second.c_str();
418} 418}
@@ -441,7 +441,7 @@ uint32_t LogTags::nameToTag_locked(const std::string& name, const char* format,
441 bool& unique) { 441 bool& unique) {
442 key2tag_const_iterator ik; 442 key2tag_const_iterator ik;
443 443
444 bool write = format != NULL; 444 bool write = format != nullptr;
445 unique = write; 445 unique = write;
446 446
447 if (!write) { 447 if (!write) {
@@ -679,7 +679,7 @@ void LogTags::WritePersistEventLogTags(uint32_t tag, uid_t uid,
679// are in readonly mode. 679// are in readonly mode.
680uint32_t LogTags::nameToTag(uid_t uid, const char* name, const char* format) { 680uint32_t LogTags::nameToTag(uid_t uid, const char* name, const char* format) {
681 std::string Name = std::string(name); 681 std::string Name = std::string(name);
682 bool write = format != NULL; 682 bool write = format != nullptr;
683 bool updateUid = uid != AID_ROOT; 683 bool updateUid = uid != AID_ROOT;
684 bool updateFormat = format && *format; 684 bool updateFormat = format && *format;
685 bool unique; 685 bool unique;
@@ -848,7 +848,7 @@ std::string LogTags::formatGetEventTag(uid_t uid, const char* name,
848 848
849 if (!list) { 849 if (!list) {
850 // switch to read entry only if format == "*" 850 // switch to read entry only if format == "*"
851 if (format && (format[0] == '*') && !format[1]) format = NULL; 851 if (format && (format[0] == '*') && !format[1]) format = nullptr;
852 852
853 // WAI: for null format, only works for a single entry, we can have 853 // WAI: for null format, only works for a single entry, we can have
854 // multiple entries, one for each format, so we find first entry 854 // multiple entries, one for each format, so we find first entry
diff --git a/logd/LogTags.h b/logd/LogTags.h
index 203318d91..e4d165a7c 100644
--- a/logd/LogTags.h
+++ b/logd/LogTags.h
@@ -87,14 +87,14 @@ class LogTags {
87 bool RebuildFileEventLogTags(const char* filename, bool warn = true); 87 bool RebuildFileEventLogTags(const char* filename, bool warn = true);
88 88
89 void AddEventLogTags(uint32_t tag, uid_t uid, const std::string& Name, 89 void AddEventLogTags(uint32_t tag, uid_t uid, const std::string& Name,
90 const std::string& Format, const char* source = NULL, 90 const std::string& Format, const char* source = nullptr,
91 bool warn = false); 91 bool warn = false);
92 92
93 void WriteDynamicEventLogTags(uint32_t tag, uid_t uid); 93 void WriteDynamicEventLogTags(uint32_t tag, uid_t uid);
94 void WriteDebugEventLogTags(uint32_t tag, uid_t uid); 94 void WriteDebugEventLogTags(uint32_t tag, uid_t uid);
95 // push tag details to persistent storage 95 // push tag details to persistent storage
96 void WritePersistEventLogTags(uint32_t tag, uid_t uid = AID_ROOT, 96 void WritePersistEventLogTags(uint32_t tag, uid_t uid = AID_ROOT,
97 const char* source = NULL); 97 const char* source = nullptr);
98 98
99 static const uint32_t emptyTag = uint32_t(-1); 99 static const uint32_t emptyTag = uint32_t(-1);
100 100
diff --git a/logd/LogWhiteBlackList.cpp b/logd/LogWhiteBlackList.cpp
index 4b8b08042..9d762dca4 100644
--- a/logd/LogWhiteBlackList.cpp
+++ b/logd/LogWhiteBlackList.cpp
@@ -51,7 +51,7 @@ std::string Prune::format() {
51} 51}
52 52
53PruneList::PruneList() { 53PruneList::PruneList() {
54 init(NULL); 54 init(nullptr);
55} 55}
56 56
57PruneList::~PruneList() { 57PruneList::~PruneList() {
@@ -79,7 +79,7 @@ int PruneList::init(const char* str) {
79 // default here means take ro.logd.filter, persist.logd.filter then 79 // default here means take ro.logd.filter, persist.logd.filter then
80 // internal default in that order. 80 // internal default in that order.
81 if (str && !strcmp(str, _default)) { 81 if (str && !strcmp(str, _default)) {
82 str = NULL; 82 str = nullptr;
83 } 83 }
84 static const char _disable[] = "disable"; 84 static const char _disable[] = "disable";
85 if (str && !strcmp(str, _disable)) { 85 if (str && !strcmp(str, _disable)) {