cache_cmp: fix comparison.

This commit is contained in:
yamt 2009-02-18 13:08:22 +00:00
parent feff5384df
commit ebdb9fb038

View File

@ -1,4 +1,4 @@
/* $NetBSD: gettext_iconv.c,v 1.7 2004/08/02 13:38:21 tshiozak Exp $ */
/* $NetBSD: gettext_iconv.c,v 1.8 2009/02/18 13:08:22 yamt Exp $ */
/*-
* Copyright (c) 2004 Citrus Project,
@ -93,7 +93,13 @@ cache_cmp(const void *va, const void *vb)
const struct cache *b = vb;
int result;
result = a->c_origmsg - b->c_origmsg;
if (a->c_origmsg > b->c_origmsg) {
result = 1;
} else if (a->c_origmsg < b->c_origmsg) {
result = -1;
} else {
result = 0;
}
return result;
}