maru_shm: consider unsigned short 07/29407/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Mon, 27 Oct 2014 11:34:13 +0000 (20:34 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Mon, 27 Oct 2014 11:39:47 +0000 (20:39 +0900)
Change-Id: Ic4d64833a9ca1c57a59136d23fd3de4e97f4f618
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/display/maru_shm.c
tizen/src/skin/client/native_src/share.c

index d7e1782..82d0cf5 100644 (file)
@@ -279,7 +279,7 @@ 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) {
@@ -297,7 +297,7 @@ 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 4063908..b96d48e 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);