maru_shm: consider unsigned short 24/29524/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 29 Oct 2014 05:29:47 +0000 (14:29 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Wed, 29 Oct 2014 05:29:47 +0000 (14:29 +0900)
Change-Id: Iae40500ef645f5fa403f99a4fee55ef33f787baf
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/display/maru_shm.c
tizen/src/skin/client/native_src/share.c

index c1967a173aa22039ac37c3f42fbfa1ebdd4d8596..414491ae518a96b1a1ad07518c5d5b91d6260810 100644 (file)
@@ -206,7 +206,7 @@ static void maru_shm_quit(void)
 
     if (shmctl(skin_shmid, IPC_STAT, &shm_info) == -1) {
         ERR("shmctl failed\n");
-        shm_info.shm_nattch = -1;
+        shm_info.shm_nattch = 0;
     }
 
     if (shmdt(shared_memory) == -1) {
@@ -224,7 +224,7 @@ static void maru_shm_quit(void)
         } else {
             INFO("shared memory was removed\n");
         }
-    } else if (shm_info.shm_nattch != -1) {
+    } else {
         INFO("number of current attaches = %d\n",
             (int)shm_info.shm_nattch);
     }
index 4063908bb6f311793a1269fdaa34b87b23170d86..b96d48e9acd1e487a3a749db513883e642d32c75 100644 (file)
@@ -106,7 +106,7 @@ JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorShmSkin_shmdt
         fflush(stderr);
         perror("share.c: ");
 
-        shm_info.shm_nattch = -1;
+        shm_info.shm_nattch = 0;
     }
 
     fprintf(stdout, "share.c: clean up the shared memory\n");
@@ -129,7 +129,7 @@ JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorShmSkin_shmdt
             perror("share.c: ");
             return 2;
         }
-    } else if (shm_info.shm_nattch != -1) {
+    } else {
         fprintf(stdout, "share.c: number of current attaches = %d\n",
             (int)shm_info.shm_nattch);
         fflush(stdout);