From 5fe850132ae05bbf9b4b166f035b672093cc7774 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 11 Oct 2015 16:22:31 +0200 Subject: Fixed various compiler warnings (follow-up to 5c22b63) Signed-off-by: Haru --- src/common/db.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/db.h') diff --git a/src/common/db.h b/src/common/db.h index afec62d86..1df306038 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -1175,7 +1175,7 @@ HPShared struct db_interface *DB; /* reduce size */ \ VECTOR_DATA(_vec) = aRealloc(VECTOR_DATA(_vec), (_n)*sizeof(VECTOR_FIRST(_vec))); /* reallocate */ \ VECTOR_CAPACITY(_vec) = (_n); /* update capacity */ \ - if (VECTOR_LENGTH(_vec) > (_n)) \ + if ((_n) - VECTOR_LENGTH(_vec) > 0) \ VECTOR_LENGTH(_vec) = (_n); /* update length */ \ } \ } while(false) -- cgit v1.2.3-70-g09d2