fix static analysis defect 30/75730/1 accepted/tizen/common/20160621.184520 accepted/tizen/ivi/20160622.093650 accepted/tizen/mobile/20160622.093541 accepted/tizen/tv/20160622.093609 accepted/tizen/wearable/20160622.093629 submit/tizen/20160621.063045
authorjongmyeongko <jongmyeong.ko@samsung.com>
Tue, 21 Jun 2016 07:19:05 +0000 (16:19 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Tue, 21 Jun 2016 07:19:05 +0000 (16:19 +0900)
Change-Id: I3329d2832890ef23f427fd6db76ec47922b316aa
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/pkgmgrinfo_appinfo.c
src/pkgmgrinfo_pkginfo.c

index 429d5c0..d5a876e 100644 (file)
@@ -17,7 +17,7 @@
 
 static bool _get_bool_value(const char *str)
 {
-       if (!strcmp(str, "true"))
+       if (str && !strcmp(str, "true"))
                return true;
        else
                return false;
index f2e8245..7daec75 100644 (file)
@@ -48,7 +48,7 @@
 
 static bool _get_bool_value(const char *str)
 {
-       if (!strcmp(str, "true"))
+       if (str && !strcmp(str, "true"))
                return true;
        else
                return false;