summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPM.c4
-rw-r--r--src/common/db.h2
-rw-r--r--src/common/socket.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 578e90bbc..5373c8b6a 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -655,7 +655,7 @@ void hplugins_config_read(void) {
libconfig->destroy(&plugins_conf);
if (VECTOR_LENGTH(HPM->plugins))
- ShowStatus("HPM: There are '"CL_WHITE"%"PRIuS""CL_RESET"' plugins loaded, type '"CL_WHITE"plugins"CL_RESET"' to list them\n", VECTOR_LENGTH(HPM->plugins));
+ ShowStatus("HPM: There are '"CL_WHITE"%d"CL_RESET"' plugins loaded, type '"CL_WHITE"plugins"CL_RESET"' to list them\n", VECTOR_LENGTH(HPM->plugins));
}
/**
@@ -674,7 +674,7 @@ CPCMD(plugins)
return;
}
- ShowInfo("HPC: There are '"CL_WHITE"%"PRIuS""CL_RESET"' plugins loaded\n", VECTOR_LENGTH(HPM->plugins));
+ ShowInfo("HPC: There are '"CL_WHITE"%d"CL_RESET"' plugins loaded\n", VECTOR_LENGTH(HPM->plugins));
for(i = 0; i < VECTOR_LENGTH(HPM->plugins); i++) {
struct hplugin *plugin = VECTOR_INDEX(HPM->plugins, i);
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)
diff --git a/src/common/socket.c b/src/common/socket.c
index f1318ab47..b4b67da40 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1523,7 +1523,7 @@ void send_shortlist_add_fd(int fd)
return;// already in the list
if (send_shortlist_count >= ARRAYLENGTH(send_shortlist_array)) {
- ShowDebug("send_shortlist_add_fd: shortlist is full, ignoring... (fd=%d shortlist.count=%d shortlist.length=%"PRIuS")\n",
+ ShowDebug("send_shortlist_add_fd: shortlist is full, ignoring... (fd=%d shortlist.count=%d shortlist.length=%d)\n",
fd, send_shortlist_count, ARRAYLENGTH(send_shortlist_array));
return;
}