]> git.deb.at Git - pkg/abook.git/commitdiff
Fixed surname sort.
authorCedric Duval <cedricduval@free.fr>
Wed, 9 Aug 2006 21:54:56 +0000 (21:54 +0000)
committerCedric Duval <cedricduval@free.fr>
Wed, 9 Aug 2006 21:54:56 +0000 (21:54 +0000)
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.

database.c

index 2b642f8aad59b5136b5e6582d19ff92e6ccaf721..a9e77b55ad15f9d344d9bdae93e052896b50b88e 100644 (file)
@@ -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];