From: Cedric Duval Date: Wed, 9 Aug 2006 21:54:56 +0000 (+0000) Subject: Fixed surname sort. X-Git-Tag: upstream/0.6.1~2^2~108 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=e731ab4b326a1e7f9ca6d81963b57cf314e97953;p=pkg%2Fabook.git Fixed surname sort. The NAME field is guaranteed to exist for every item, and besides, a non-existence check would have to be made against -1, not 0. --- diff --git a/database.c b/database.c index 2b642f8..a9e77b5 100644 --- a/database.c +++ b/database.c @@ -543,9 +543,6 @@ surnamecmp(const void *i1, const void *i2) int ret, idx = field_id(NAME); char *n1, *n2, *s1, *s2; - if(idx == 0) - return 0; /* no 'name' field */ - n1 = (*(list_item *)i1)[idx]; n2 = (*(list_item *)i2)[idx];