X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fipc.c;h=74db3adfdb53f329aec5042e2d78b798ad9aadad;hb=01d23e3f5daf016d03f82d92a76be2fe3decdca4;hp=c9fb003e69bd058ddb717afe8343952488aa05cd;hpb=f7e2d82c4d016df72c55e85bb9c5bc9ba08d5f91;p=collectd.git diff --git a/src/ipc.c b/src/ipc.c index c9fb003e..74db3adf 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; }