launcher, launchctl: refactoring

This commit is contained in:
Bill Zissimopoulos
2016-05-13 09:55:27 -07:00
parent 35d2b3f626
commit 2c51251cb7
2 changed files with 18 additions and 8 deletions

View File

@ -80,8 +80,15 @@ static int call_pipe_and_report(PWSTR PipeBuf, ULONG SendSize, ULONG RecvSize)
{
for (PWSTR P = PipeBuf, PipeBufEnd = P + BytesTransferred / sizeof(WCHAR);
PipeBufEnd > P; P++)
if (L'\0' == *P)
switch (*P)
{
case L'\0':
*P = L'\n';
break;
case L'\1':
*P = L' ';
break;
}
if (BytesTransferred < RecvSize)
PipeBuf[BytesTransferred / sizeof(WCHAR)] = L'\0';