From: Ruben Kerkhof Date: Wed, 12 Jul 2017 16:59:07 +0000 (+0200) Subject: Merge branch 'collectd-5.7' X-Git-Tag: collectd-5.8.0~121 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=267bbc64779f9c7b32e063aac0df22be61bda6ae;hp=bea5daaed7b5cf9160207a95292947873fdcf927 Merge branch 'collectd-5.7' Conflicts: contrib/systemd.collectd.service --- diff --git a/contrib/systemd.collectd.service b/contrib/systemd.collectd.service index 853363d7..6333d49a 100644 --- a/contrib/systemd.collectd.service +++ b/contrib/systemd.collectd.service @@ -30,8 +30,6 @@ ProtectHome=true # By default, drop all capabilities: CapabilityBoundingSet= -NoNewPrivileges=true - # Tell systemd it will receive a notification from collectd over its control # socket once the daemon is ready. See systemd.service(5) for more details. Type=notify diff --git a/src/ipc.c b/src/ipc.c index 432c5e08..ed8a0c01 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -251,14 +251,14 @@ static int ipc_read_shm(void) /* {{{ */ ipcinfo_shm_t *pshm; unsigned int shm_segments = 0; size64_t shm_bytes = 0; - int n; + int i, n; ipcinfo_shm = (ipcinfo_shm_t *)ipc_get_info( 0, GET_IPCINFO_SHM_ALL, IPCINFO_SHM_VERSION, sizeof(ipcinfo_shm_t), &n); if (ipcinfo_shm == NULL) return -1; - for (int i = 0, pshm = ipcinfo_shm; i < n; i++, pshm++) { + for (i = 0, pshm = ipcinfo_shm; i < n; i++, pshm++) { shm_segments++; shm_bytes += pshm->shm_segsz; }