X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fipc.c;h=b164cdf72b517da03de6847a4e7c68f4f6e5608e;hb=7dcf9ab7675fe91d1bd74998f55031bc3b0480c0;hp=495198947f3e9d6cedbf6ea26a399a14ba051edd;hpb=4103105fb43cd72294f165b2541540b3a8a99532;p=collectd.git diff --git a/src/ipc.c b/src/ipc.c index 49519894..b164cdf7 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -30,7 +30,6 @@ #include "common.h" #include "plugin.h" -#include "configfile.h" #if KERNEL_LINUX /* _GNU_SOURCE is needed for struct shm_info.used_ids on musl libc */ @@ -237,14 +236,14 @@ static int ipc_read_sem (void) /* {{{ */ ipcinfo_sem_t *ipcinfo_sem; unsigned short sem_nsems=0; unsigned short sems=0; - int i,n; + int n; ipcinfo_sem = (ipcinfo_sem_t *)ipc_get_info(0, GET_IPCINFO_SEM_ALL, IPCINFO_SEM_VERSION, sizeof(ipcinfo_sem_t), &n); if (ipcinfo_sem == NULL) return -1; - for (i=0; ishm_segsz; } @@ -288,14 +287,14 @@ static int ipc_read_msg (void) /* {{{ */ uint32_t msg_used_space=0; uint32_t msg_alloc_queues=0; msgqnum32_t msg_qnum=0; - int i,n; + int n; ipcinfo_msg = (ipcinfo_msg_t *)ipc_get_info(0, GET_IPCINFO_MSG_ALL, IPCINFO_MSG_VERSION, sizeof(ipcinfo_msg_t), &n); if (ipcinfo_msg == NULL) return -1; - for (i=0; i