Code

Fixed failed compilation on AIX
authorPavel Rochnyack <pavel2000@ngs.ru>
Tue, 11 Jul 2017 04:08:56 +0000 (11:08 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Tue, 11 Jul 2017 04:14:24 +0000 (11:14 +0700)
Caused by typo in 2761915bed8c6caea41018be3e675aa712cc0b0a / #1842.

Closes: #2305
src/ipc.c

index d06b0e3a3d06e9075316df7907e5ae32569eda35..97d71429bffe02b3a886606546b6dffc77b6151d 100644 (file)
--- 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;
   }