cmd: Reuse common string constants.

This commit is contained in:
Frédéric Delanoy 2012-09-28 11:13:16 +02:00 committed by Alexandre Julliard
parent 8b3d494247
commit c5a4878f5f
1 changed files with 1 additions and 2 deletions

View File

@ -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;