mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 17:28:02 +02:00
Process: Avoid calling strlen()
repeatedly & remove some dead code
This commit is contained in:
parent
f1c2c0bcb9
commit
d742f6acbb
@ -109,11 +109,11 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
for (int i = 0; i < envc; i++) {
|
for (int i = 0; i < envc; i++) {
|
||||||
if (strncmp(environ[i], lcnumeric, strlen(lcnumeric)) == 0) {
|
if (strcmp(environ[i], lcnumeric) == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp(environ[i], notifySocket, strlen(notifySocket)) == 0) {
|
if (strcmp(environ[i], notifySocket) == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,9 +292,6 @@ static void ProcessHandler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
count += rc;
|
count += rc;
|
||||||
|
|
||||||
if (rc == 0)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String jrequest = String(mbuf, mbuf + count);
|
String jrequest = String(mbuf, mbuf + count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user