From 1aeb0661d45990532d4bbd3e515dc7a4c3bd9024 Mon Sep 17 00:00:00 2001 From: Brandon Turner Date: Tue, 13 Jun 2006 00:26:08 +0000 Subject: [PATCH] * When comparing two strings, you do not need to check what comes after them. * You do not need to look for the next space in the "command" to run on if success, that will be handled later on, and causes it to skip over to much if it done in both spots svn path=/trunk/; revision=22334 --- reactos/base/shell/cmd/if.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reactos/base/shell/cmd/if.c b/reactos/base/shell/cmd/if.c index b040d1c098d..3082cd66f0a 100644 --- a/reactos/base/shell/cmd/if.c +++ b/reactos/base/shell/cmd/if.c @@ -177,15 +177,13 @@ INT cmd_if (LPTSTR cmd, LPTSTR param) while (_istspace (*pp)) /* Skip subsequent spaces */ pp++; - /* are the two sides equal, and does the second end in the same place? */ - if ( !_tcsncmp(param,pp,p1len) && _tcschr(_T(" ("),pp[p1len]) ) + /* are the two sides equal*/ + if ( !_tcsncmp(param,pp,p1len)) x_flag ^= X_EXEC; pp += p1len; if ( x_flag ) { - while (*pp && !_istspace (*pp)) /* Find first space, */ - pp++; x_flag |= X_EMPTY; } }