From: Pavel Rochnyack Date: Tue, 11 Jul 2017 04:08:56 +0000 (+0700) Subject: Fixed failed compilation on AIX X-Git-Tag: collectd-5.6.3~18^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=336c5c5170b65c3983bf98e9b114759cce1de54c;p=collectd.git Fixed failed compilation on AIX Caused by typo in 2761915bed8c6caea41018be3e675aa712cc0b0a / #1842. Closes: #2305 --- diff --git a/src/ipc.c b/src/ipc.c index d06b0e3a..97d71429 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -255,14 +255,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; }