fix svace error 02/61902/1 accepted/tizen/common/20160311.203646 accepted/tizen/ivi/20160311.150250 accepted/tizen/mobile/20160311.143222 accepted/tizen/tv/20160311.144807 accepted/tizen/wearable/20160311.145617 submit/tizen/20160311.064104
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Mar 2016 05:57:02 +0000 (14:57 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Mar 2016 05:57:25 +0000 (14:57 +0900)
Change-Id: I07be44084174f783eb5080f02405fc24f7a1127a
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/examples/pepper_efl_example.c
src/examples/pepper_efl_simple.c
src/lib/compositor.c

index 13aaf322ad27380bb1459decd57ac0302e823ecc..cadc9094016568aa4cfac8733e417bc99f87e03f 100644 (file)
@@ -215,17 +215,17 @@ client_launch(app_data *d)
      {
         if (!d->app_num)
           {
-             sprintf(path, "%s/touch_sample", SAMPLE_PATH);
+             snprintf(path, 64, "%s/touch_sample", SAMPLE_PATH);
              execl(path, "touch_sample", NULL);
           }
         else if (d->app_num == 1)
           {
-             sprintf(path, "%s/thread_sample", SAMPLE_PATH);
+             snprintf(path, 64, "%s/thread_sample", SAMPLE_PATH);
              execl(path, "thread_sample", NULL);
           }
         else if (d->app_num == 3)
           {
-             sprintf(path, "%s/entry_sample", SAMPLE_PATH);
+             snprintf(path, 64, "%s/entry_sample", SAMPLE_PATH);
              execl(path, "entry_sample", NULL);
           }
      }
@@ -550,7 +550,7 @@ elm_main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
    elm_box_pack_end(sc_bx, d->tb2);
 
    /* border object (pre-drawing box) */
-   sprintf(border_path, "%s/red.png", DATA_PATH);
+   snprintf(border_path, 64, "%s/red.png", DATA_PATH);
 
    d->border_obj = evas_object_image_filled_add(evas_object_evas_get(d->win));
    evas_object_image_file_set(d->border_obj, border_path, NULL);
index e7d20bf1514ed3a292ea9da68a0e43e60401ad1e..8eca2b8f1754a8bc2d0c83862b2ee77ef1319f7e 100644 (file)
@@ -1,9 +1,13 @@
 #include <Elementary.h>
 #include "Pepper_Efl.h"
+#include <time.h>
 
 #define WIDTH 1920
 #define HEIGHT 1080
 
+static unsigned int seedx = 1;
+static unsigned int seedy = 43210;
+
 typedef struct
 {
    Evas_Object *win;
@@ -18,8 +22,8 @@ _add_object_cb (void *data, Evas_Object *obj, void *event_info)
    evas_object_geometry_get(img, &x, &y, &w, &h);
    fprintf(stderr, "[ECOMP] _add_object_cb %p:%p(%dx%d+%d+%d)\n",obj, img, w, h, x, y);
 
-   x = rand()%(WIDTH-w);
-   y = rand()%(HEIGHT-h);
+   x = rand_r(&seedx)%(WIDTH-w);
+   y = rand_r(&seedy)%(HEIGHT-h);
    evas_object_move(img, x, y);
    evas_object_show(img);
 }
index 0f0e7551ee1308070ecaac4f58eeaa7d445ca940..cf533ce4320664c3544edeaa9fa1540900e061b0 100644 (file)
@@ -226,6 +226,8 @@ create_output:
         if (first_init)
           goto err_output;
 
+        pthread_mutex_unlock(&_comp_hash_lock);
+
         return NULL;
      }