summaryrefslogtreecommitdiff
path: root/src/common/db.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-10-11 16:22:31 +0200
committerHaru <haru@dotalux.com>2015-10-11 16:22:31 +0200
commit5fe850132ae05bbf9b4b166f035b672093cc7774 (patch)
tree41ec952ff8dda13dff2c7aebec137bf56d8e312b /src/common/db.h
parent497510b22278aafaa7dedb8a6c705e8cdd35e9db (diff)
downloadhercules-5fe850132ae05bbf9b4b166f035b672093cc7774.tar.gz
hercules-5fe850132ae05bbf9b4b166f035b672093cc7774.tar.bz2
hercules-5fe850132ae05bbf9b4b166f035b672093cc7774.tar.xz
hercules-5fe850132ae05bbf9b4b166f035b672093cc7774.zip
Fixed various compiler warnings (follow-up to 5c22b63)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/db.h')
-rw-r--r--src/common/db.h2
1 files changed, 1 insertions, 1 deletions
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)