From bb5ea9e289f73114311782478859a0162fc9d201 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Tue, 5 Jan 2010 19:27:14 +0000 Subject: [PATCH] Make the logic easier to read svn path=/trunk/; revision=44957 --- .../base/applications/mscutils/servman/stop_dependencies.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/base/applications/mscutils/servman/stop_dependencies.c b/reactos/base/applications/mscutils/servman/stop_dependencies.c index 53860d004e1..ca4c021e626 100644 --- a/reactos/base/applications/mscutils/servman/stop_dependencies.c +++ b/reactos/base/applications/mscutils/servman/stop_dependencies.c @@ -47,8 +47,12 @@ AddServiceToList(LPWSTR *lpServiceList, dwCurSize = 0; /* Get the list size */ - while (*ptr != L'\0' || *(ptr + 1) != L'\0') + while (TRUE) { + /* Break when we hit the double null */ + if (*ptr == L'\0' && *(ptr + 1) == L'\0') + break; + ptr++; dwCurSize++; }