Merge branch 'collectd-5.7'
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 12 Jul 2017 16:59:07 +0000 (18:59 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 12 Jul 2017 16:59:07 +0000 (18:59 +0200)
Conflicts:
contrib/systemd.collectd.service

contrib/systemd.collectd.service
src/ipc.c

index 853363d..6333d49 100644 (file)
@@ -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
index 432c5e0..ed8a0c0 100644 (file)
--- 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;
   }