Fix prevent issue.
authorhhh.kwon <hhh.kwon@samsung.com>
Tue, 8 Jan 2013 10:15:06 +0000 (19:15 +0900)
committerhhh.kwon <hhh.kwon@samsung.com>
Tue, 8 Jan 2013 10:15:06 +0000 (19:15 +0900)
src/_cpu.c
src/_genlist.c
src/_logic.c

index ee5cb18..84895f4 100755 (executable)
@@ -38,6 +38,7 @@ int _get_stat_info(pid_t pid, unsigned int *ut, unsigned int *st)
        char buf[128] = {0, };
        unsigned long cutime, cstime;
        int i;
+       int ret = -1;
 
        snprintf(buf, sizeof(buf), "/proc/%d/stat", (int)pid);
 
@@ -46,8 +47,9 @@ int _get_stat_info(pid_t pid, unsigned int *ut, unsigned int *st)
        fp = fopen(buf, "r");
        if (fp) {
                retvm_if(fp == NULL, -1, "Failed to open %s\n", buf);
-               fscanf(fp, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lu %lu %ld %ld",
+               ret = fscanf(fp, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lu %lu %ld %ld",
                                ut, st, &cutime, &cstime);
+               retvm_if(ret < 0, -1, "Failed to fscanf() \n");
                *ut += cutime;
                *st += cstime;
                fclose(fp);
index 0c65dca..32721ca 100755 (executable)
@@ -587,12 +587,6 @@ _D("func\n");
                                                NULL, NULL);
                        elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-
-                       item = elm_genlist_item_append(ad->gl, &itc_bl,
-                                               (void *)i, git,
-                                               ELM_GENLIST_ITEM_NONE,
-                                               _bl_sel, (void *)i);
-
                        item = elm_genlist_item_append(ad->gl, &itc_separator2,
                                                NULL, git,
                                                ELM_GENLIST_ITEM_NONE,
index 48a6ead..e9cbe29 100755 (executable)
@@ -49,35 +49,37 @@ _D("func\n");
        _D("mode(%d) count(%d) pid(%d) \n", ad->mode, ad->endcnt, pid);
 
        if (ret != -1) {
-       switch (ad->mode) {
-       default:
-       case MODE_END_INUSE:
-       case MODE_DEL_HISTORY:
-       case MODE_DEL_ALL_HISTORY:
-       case MODE_KILL_INUSE:
-               _D("aa\n");
-               _del_popup_timer(ad);
-               _del_progressbar(ad);
-               refresh_app_info(ad);
-               _restart_pthread(ad);
-               break;
-
-       case MODE_END_ALL_INUSE:
-       case MODE_KILL_ALL_INUSE:
-               _D("bb\n");
-               if (ad->endcnt <= 1) {
-                       _D("count set 0\n");
+               switch (ad->mode) {
+               default:
+               case MODE_END_INUSE:
+               case MODE_DEL_HISTORY:
+               case MODE_DEL_ALL_HISTORY:
+               case MODE_KILL_INUSE:
+                       _D("aa\n");
                        _del_popup_timer(ad);
                        _del_progressbar(ad);
                        refresh_app_info(ad);
                        _restart_pthread(ad);
+                       break;
 
-               } else {
-                       ad->endcnt--;
+               case MODE_END_ALL_INUSE:
+               case MODE_KILL_ALL_INUSE:
+                       _D("bb\n");
+                       if (ad->endcnt <= 1) {
+                               _D("count set 0\n");
+                               _del_popup_timer(ad);
+                               _del_progressbar(ad);
+                               refresh_app_info(ad);
+                               _restart_pthread(ad);
+
+                       } else {
+                               ad->endcnt--;
+                       }
+                       break;
                }
-               break;
        }
-}
+
+       return ret;
 }
 
 static void _back_cb(void *data, Evas_Object *obj, void *event_info)