X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=listati%2FMemShared.c;h=fa72c32a07d79fe327cb0c89c862634d53b0b09b;hp=dfeea8db164abea0cd65daa4e62e69576dff8fca;hb=d47f15496fa85c8ec22edcde608f2665ec5b95ae;hpb=b324b7a09e071b2f84a1849d109d4d14f27f44cd diff --git a/listati/MemShared.c b/listati/MemShared.c index dfeea8d..fa72c32 100644 --- a/listati/MemShared.c +++ b/listati/MemShared.c @@ -6,7 +6,7 @@ void * CreateShm(char * shm_name, off_t shm_size, mode_t perm, int fill) int flag; /* first open the object, creating it if not existent */ flag = O_CREAT|O_EXCL|O_RDWR; - fd = shm_open(shm_name, flag, perm); /* get object file descriptor */ + fd = shm_open(shm_name, flag, perm); /* get object file descriptor */ if (fd < 0) { return NULL; } @@ -19,14 +19,14 @@ void * CreateShm(char * shm_name, off_t shm_size, mode_t perm, int fill) if (shm_ptr == MAP_FAILED) { return NULL; } - memset((void *) shm_ptr, fill, shm_size); /* fill segment */ + memset((void *) shm_ptr, fill, shm_size); /* fill segment */ return shm_ptr; } /* Function FindShm: Find a POSIX shared memory segment */ void * FindShm(char * shm_name, off_t shm_size) { void * shm_ptr; - int fd; /* ID of the IPC shared memory segment */ + int fd; /* ID of the IPC shared memory segment */ /* find shared memory ID */ if ((fd = shm_open(shm_name, O_RDWR|O_EXCL, 0)) < 0) { return NULL;