cmd: Reuse common string constants

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Sep 28 04:13:16 CDT 2012


---
 programs/cmd/builtins.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 8421194..57ac339 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -2241,9 +2241,8 @@ static int WCMD_compare( const void *a, const void *b )
 {
     int r;
     const WCHAR * const *str_a = a, * const *str_b = b;
-    static const WCHAR eqW[]   = {'=','\0'};
     r = CompareStringW( LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
-	  *str_a, strcspnW(*str_a, eqW), *str_b, strcspnW(*str_b, eqW) );
+	  *str_a, strcspnW(*str_a, equalW), *str_b, strcspnW(*str_b, equalW) );
     if( r == CSTR_LESS_THAN ) return -1;
     if( r == CSTR_GREATER_THAN ) return 1;
     return 0;
-- 
1.7.11.3




More information about the wine-patches mailing list