Fix the build error
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 14 Aug 2012 07:21:58 +0000 (16:21 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 14 Aug 2012 07:21:58 +0000 (16:21 +0900)
Change-Id: If551d6df84736e8e7bd1a20d37603f97501492c4

src/buffer_handler.c
src/fb.c

index 732a2b0..a6ac722 100644 (file)
@@ -95,6 +95,8 @@ struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buffer_ty
 
 int buffer_handler_load(struct buffer_info *info)
 {
+       int len;
+
        if (!info) {
                DbgPrint("buffer handler is nil\n");
                return -EINVAL;
@@ -106,7 +108,6 @@ int buffer_handler_load(struct buffer_info *info)
        }
 
        if (info->type == BUFFER_TYPE_FILE) {
-               int len;
                double timestamp;
 
                len = strlen(g_conf.path.image) + 40;
@@ -130,7 +131,6 @@ int buffer_handler_load(struct buffer_info *info)
        } else if (info->type == BUFFER_TYPE_SHM) {
                int id;
                int size;
-               int len;
                struct buffer *buffer; /* Just for getting a size */
 
                size = info->w * info->h * info->pixel_size;
index 7253ab7..3d250ad 100644 (file)
--- a/src/fb.c
+++ b/src/fb.c
@@ -106,7 +106,7 @@ static void *alloc_fb(void *data, int size)
                snprintf(info->id, fname_len, "shm://%d", id);
        } else if (info->type == FB_TYPE_PIXMAP) {
                ErrPrint("Pixmap is not supported yet\n");
-               strncpy(info->id, fname_len, "pixmap://-1");
+               strncpy(info->id, "pixmap://-1", fname_len);
        }
 
        info->bufsz = size;