fix svace error 03/61903/2 accepted/tizen/common/20160311.203624 accepted/tizen/ivi/20160311.150232 accepted/tizen/mobile/20160311.143209 accepted/tizen/tv/20160311.144803 accepted/tizen/wearable/20160311.145611 submit/tizen/20160311.063943
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Mar 2016 05:57:53 +0000 (14:57 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Mar 2016 06:01:36 +0000 (15:01 +0900)
Change-Id: I6b9df73f2b3460b51e6f0f2b9d136fb69f7d5e08
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/lib/pepper/subsurface.c
src/lib/pepper/utils-log.c
src/lib/pepper/utils-vt.c

index f000106c1abb9a9a260c33eb7e122b1b36f39672..7a900810ecbe51d090fe3b4073defb256d01e758 100644 (file)
@@ -575,14 +575,25 @@ subsurface_destroy_children_views(pepper_subsurface_t *subsurface,
                /* Except its own */
                if (child && (child != subsurface)) {
                        pepper_view_t *view;
+                       pepper_view_t *delete_view = NULL;
 
                        pepper_list_for_each(view, &subsurface->surface->view_list, surface_link) {
                                if (view->parent == parent_view) {
+#if 0
                                        /* FIXME: need this ? */
                                        pepper_view_set_surface(view, NULL);
                                        pepper_view_destroy(view);
+#else
+                                       delete_view = view;
+#endif
                                }
                        }
+
+                       /* FIXME: need this ? */
+                       if (delete_view) {
+                               pepper_view_set_surface(delete_view, NULL);
+                               pepper_view_destroy(delete_view);
+                       }
                }
        }
 }
index 68c5c6b8e773c955f9eaa89c716637881e71c5c2..191d2fd625a239072eec611376f3e1003584117d 100644 (file)
@@ -52,7 +52,7 @@ pepper_print_timestamp(void)
 
        gettimeofday(&tv, NULL);
 
-       brokendown_time = localtime(&tv.tv_sec);
+       localtime_r(&tv.tv_sec, brokendown_time);
        if (brokendown_time == NULL)
                return fprintf(pepper_log_file, "[(NULL)localtime] ");
 
index 1b2071ec4c8273c1070631579199e44c799b00c9..705bdbd78e80812239369d67c22e83ae1eca54e0 100644 (file)
@@ -94,7 +94,7 @@ pepper_virtual_terminal_setup(int tty)
        } else {
                char tty_str[32];
 
-               sprintf(tty_str, "/dev/tty%d", tty);
+               snprintf(tty_str, 32, "/dev/tty%d", tty);
                fd = open(tty_str, O_RDWR | O_CLOEXEC);
                if (fd < 0)
                        return PEPPER_FALSE;