razor.c
changeset 23 8ffc32c648e2
parent 22 083768007350
child 24 5963746558e7
     1.1 --- a/razor.c	Thu Sep 13 10:44:03 2007 -0400
     1.2 +++ b/razor.c	Thu Sep 13 10:51:39 2007 -0400
     1.3 @@ -660,7 +660,10 @@
     1.4  	struct razor_set *set = data;
     1.5  	char *pool = set->string_pool.data;
     1.6  
     1.7 -	return strcmp(&pool[pkg1->name], &pool[pkg2->name]);
     1.8 +	if (pkg1->name == pkg2->name)
     1.9 +		return 0;
    1.10 +	else
    1.11 +		return strcmp(&pool[pkg1->name], &pool[pkg2->name]);
    1.12  }
    1.13  
    1.14  static int
    1.15 @@ -669,13 +672,11 @@
    1.16  	const struct import_property *prop1 = p1, *prop2 = p2;
    1.17  	struct razor_set *set = data;
    1.18  	char *pool = set->string_pool.data;
    1.19 -	int result;
    1.20  
    1.21 -	result = strcmp(&pool[prop1->name], &pool[prop2->name]);
    1.22 -	if (result == 0)
    1.23 +	if (prop1->name == prop2->name)
    1.24  		return strcmp(&pool[prop1->version], &pool[prop2->version]);
    1.25  	else
    1.26 -		return result;
    1.27 +		return strcmp(&pool[prop1->name], &pool[prop2->name]);
    1.28  }
    1.29  
    1.30  static unsigned long *