[Tizen 6.0] enable build with GCC 9.2 64/221464/1 accepted/tizen/unified/20200107.043341 submit/tizen/20200106.054830
authorAbhishek Vijay <abhishek.v@samsung.com>
Thu, 2 Jan 2020 11:53:17 +0000 (17:23 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Thu, 2 Jan 2020 11:53:17 +0000 (17:23 +0530)
Change-Id: I84785246835ef3c72e6e46832685910bd1c3c96f
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
common/src/account_db_helper.c

index 35f33c4acc4bdc438eaabe261751e32489c381e9..c05fd423db9d95fdcf4b67ef6f81f495374cb142 100644 (file)
@@ -127,9 +127,9 @@ char *_account_get_current_appid(int pid, uid_t uid)
        /* platform core exception */
        if (strlen(appid) == 0) {
                _INFO("");
-               char *cmdline = NULL;
-               cmdline = _account_get_proc_cmdline_bypid(pid);
-               ACCOUNT_SLOGD("cmdline (%s)!!!!!!\n", cmdline);
+               char *cmdline = _account_get_proc_cmdline_bypid(pid);
+               if (cmdline != NULL)
+                       ACCOUNT_SLOGD("cmdline (%s)!!!!!!\n", cmdline);
                if (!g_strcmp0(cmdline, EMAIL_SERVICE_CMDLINE)) {
                        appid_ret = _account_dup_text(EMAIL_APPID);
                        _ACCOUNT_FREE(cmdline);
@@ -2072,7 +2072,7 @@ int _account_type_delete_by_app_id(sqlite3 *account_db_handle, const char* app_i
                return _ACCOUNT_ERROR_PERMISSION_DENIED;
        }
 
-       if (count <= 0) {
+       if (count <= 0 && app_id != NULL) {
                ACCOUNT_SLOGE("app id(%s) is not exist. count(%d)\n", app_id, count);
                return _ACCOUNT_ERROR_RECORD_NOT_FOUND;
        }