--- mm_core.c 2002/12/19 09:11:51 1.17
+++ mm_core.c 2002/12/19 09:14:58 1.18
@@ -6,7 +6,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -118,10 +118,10 @@
int fd = -1;
pid_t pid;
int i;
-
+
pid = getpid();
- for (i = 0; i < MM_MAXCHILD &&
- mc->mc_fdsem[i].pid != 0 &&
+ for (i = 0; i < MM_MAXCHILD &&
+ mc->mc_fdsem[i].pid != 0 &&
mc->mc_fdsem[i].fd != -1; i++) {
if (mc->mc_fdsem[i].pid == pid) {
fd = mc->mc_fdsem[i].fd;
@@ -239,7 +239,7 @@
#endif
#if defined(MM_SHMT_MMANON)
- if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
+ if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_SHARED, -1, 0)) == (void *)MAP_FAILED)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to memory map anonymous area");
#endif /* MM_SHMT_MMANON */
@@ -257,7 +257,7 @@
if (ftruncate(fdmem, mm_core_mapoffset+size) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to truncate tempfile");
write(fdmem, &zero, sizeof(zero));
- if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
+ if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
MAP_SHARED, fdmem, mm_core_mapoffset)) == (void *)MAP_FAILED)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to memory map tempfile");
shm_unlink(fnmem);
@@ -274,7 +274,7 @@
if (lseek(fdmem, mm_core_mapoffset+size, SEEK_SET) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to seek in /dev/zero");
write(fdmem, &zero, sizeof(zero));
- if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
+ if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
MAP_SHARED, fdmem, mm_core_mapoffset)) == (void *)MAP_FAILED)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to memory map /dev/zero");
mm_core_mapoffset += size;
@@ -291,7 +291,7 @@
if (ftruncate(fdmem, mm_core_mapoffset+size) == -1)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to truncate memory file");
write(fdmem, &zero, sizeof(zero));
- if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
+ if ((area = (void *)mmap(NULL, size, PROT_READ|PROT_WRITE,
MAP_SHARED, fdmem, mm_core_mapoffset)) == (void *)MAP_FAILED)
FAIL(MM_ERR_CORE|MM_ERR_SYSTEM, "failed to memory map memory file");
mm_core_mapoffset += size;
@@ -609,7 +609,7 @@
}
}
#endif
-
+
if (rc < 0) {
ERR(MM_ERR_CORE|MM_ERR_SYSTEM, "Failed to lock");
rc = FALSE;
|