logd: remove unnecessary static

ThreadFunction() will only be entered once, so there's no worry that
we'll call prctl() multiple times.

Test: logging unit tests
Change-Id: Id2a02c2ab807f1565e3d625424e040481b3aa1a3
This commit is contained in:
Tom Cherry 2020-05-06 12:04:09 -07:00
parent a269c7c3d1
commit 40addf79d4

View file

@ -45,11 +45,7 @@ bool LogListener::StartListener() {
}
void LogListener::ThreadFunction() {
static bool name_set;
if (!name_set) {
prctl(PR_SET_NAME, "logd.writer");
name_set = true;
}
prctl(PR_SET_NAME, "logd.writer");
while (true) {
HandleData();