Fix build warning
authorSangyoon Jang <s89.jang@samsung.com>
Wed, 7 Dec 2016 11:28:58 +0000 (20:28 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Fri, 23 Dec 2016 08:16:52 +0000 (17:16 +0900)
Initialize local variable. (-Wmaybe-uninitialized)

Change-Id: I70a8b197feb56924d87d1881e79431feac97150c
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
client/src/pkgmgr.c

index 6894306..f3d8ff5 100644 (file)
@@ -454,7 +454,7 @@ API int pkgmgr_client_usr_install(pkgmgr_client *pc, const char *pkg_type,
        GVariantBuilder *builder = NULL;
        GVariant *args = NULL;
        struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
-       char *pkgtype;
+       char *pkgtype = NULL;
        struct cb_info *cb_info;
 
        if (pc == NULL || pkg_path == NULL) {
@@ -610,7 +610,7 @@ API int pkgmgr_client_usr_mount_install(pkgmgr_client *pc, const char *pkg_type,
        GVariantBuilder *builder = NULL;
        GVariant *args = NULL;
        struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
-       char *pkgtype;
+       char *pkgtype = NULL;
        struct cb_info *cb_info;
 
        if (pc == NULL || pkg_path == NULL) {