summaryrefslogtreecommitdiff
path: root/iflag.h
diff options
context:
space:
mode:
Diffstat (limited to 'iflag.h')
-rw-r--r--iflag.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/iflag.h b/iflag.h
index 0764a05..b1144be 100644
--- a/iflag.h
+++ b/iflag.h
@@ -43,9 +43,9 @@ static inline void iflag_set_all(iflag_t *f)
static inline int iflag_cmp(const iflag_t *a, const iflag_t *b)
{
- unsigned int i;
+ int i;
- for (i = 0; i < sizeof(a->field) / sizeof(a->field[0]); i++) {
+ for (i = sizeof(a->field) / sizeof(a->field[0]) - 1; i >= 0; i--) {
if (a->field[i] < b->field[i])
return -1;
else if (a->field[i] > b->field[i])