Replace part or data with "" if null.
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 18 Dec 2012 04:37:01 +0000 (13:37 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 18 Dec 2012 04:37:01 +0000 (13:37 +0900)
Change-Id: Ieb9b8ad4acb6ae2a2966ef3c8fe863eaf82703aa

packaging/liblivebox.spec
src/livebox.c

index 0da34d5..e296076 100644 (file)
@@ -1,6 +1,6 @@
 Name: liblivebox
 Summary: Library for the development of a livebox 
-Version: 0.1.4
+Version: 0.1.5
 Release: 1
 Group: main/app
 License: Samsung Proprietary License
index 244919b..03ab67f 100644 (file)
@@ -345,9 +345,15 @@ EAPI int livebox_desc_add_block(struct livebox_desc *handle, const char *id, con
 {
        struct block *block;
 
-       if (!handle || !type || !part || !data)
+       if (!handle || !type)
                return -EINVAL;
 
+       if (!part)
+               part = "";
+
+       if (!data)
+               data = "";
+
        block = calloc(1, sizeof(*block));
        if (!block)
                return -ENOMEM;