From: Sung-jae Park Date: Tue, 5 Mar 2013 15:26:13 +0000 (+0000) Subject: Replace the NULL with SQLITE_TRANSIENT. X-Git-Tag: accepted/tizen_2.1/20130425.023343~9^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3267e0cbb2079752792f46086342eccccb0239f;p=platform%2Fframework%2Fweb%2Flivebox-service.git Replace the NULL with SQLITE_TRANSIENT. NULL is defined as SQLITE_STATIC. But I intend to use the SQLITE_TRANSIENT, so I set it correctly. Change-Id: I82092422f1478ea25ac3957e5ec3c911aefad253 --- diff --git a/packaging/liblivebox-service.spec b/packaging/liblivebox-service.spec index 6b73913..e1d59f6 100644 --- a/packaging/liblivebox-service.spec +++ b/packaging/liblivebox-service.spec @@ -1,6 +1,6 @@ Name: liblivebox-service Summary: Service API for gathering installed livebox information. -Version: 0.3.8 +Version: 0.3.9 Release: 1 Group: framework/livebox License: Flora License diff --git a/src/livebox-service.c b/src/livebox-service.c index 83eb633..1d52caf 100644 --- a/src/livebox-service.c +++ b/src/livebox-service.c @@ -521,7 +521,7 @@ EAPI int livebox_service_get_supported_size_types(const char *pkgid, int *cnt, i goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_reset(stmt); @@ -595,7 +595,7 @@ static inline char *get_default_name(const char *pkgid) return NULL; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -638,7 +638,7 @@ static inline char *get_default_icon(const char *pkgid) return NULL; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -681,7 +681,7 @@ EAPI char *livebox_service_content(const char *pkgid) return NULL; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -725,7 +725,7 @@ EAPI char *livebox_service_setup_appid(const char *lbid) } appid = NULL; - ret = sqlite3_bind_text(stmt, 1, lbid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, lbid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -768,7 +768,7 @@ EAPI int livebox_service_nodisplay(const char *pkgid) return 0; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); ret = 0; @@ -811,13 +811,13 @@ static inline char *get_lb_pkgname_by_appid(const char *appid) return NULL; } - ret = sqlite3_bind_text(stmt, 1, appid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, appid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; } - ret = sqlite3_bind_text(stmt, 2, appid, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, appid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -875,7 +875,7 @@ EAPI int livebox_service_touch_effect(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, lbid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, lbid, -1, SQLITE_TRANSIENT); free(lbid); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); @@ -923,7 +923,7 @@ EAPI int livebox_service_mouse_event(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, lbid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, lbid, -1, SQLITE_TRANSIENT); free(lbid); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); @@ -964,7 +964,7 @@ EAPI char *livebox_service_preview(const char *pkgid, int size_type) return NULL; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -1028,13 +1028,13 @@ EAPI char *livebox_service_i18n_icon(const char *pkgid, const char *lang) return NULL; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; } - ret = sqlite3_bind_text(stmt, 2, language, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, language, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -1097,13 +1097,13 @@ EAPI char *livebox_service_i18n_name(const char *pkgid, const char *lang) return NULL; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; } - ret = sqlite3_bind_text(stmt, 2, language, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, language, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -1153,7 +1153,7 @@ EAPI int livebox_service_get_supported_sizes(const char *pkgid, int *cnt, int *w goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_reset(stmt); @@ -1203,14 +1203,14 @@ EAPI char *livebox_service_libexec(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); goto out; } - ret = sqlite3_bind_text(stmt, 2, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); @@ -1396,7 +1396,7 @@ EAPI int livebox_service_is_primary(const char *lbid) return 0; } - ret = sqlite3_bind_text(stmt, 1, lbid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, lbid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); goto out; @@ -1444,7 +1444,7 @@ EAPI char *livebox_service_appid(const char *pkgname) goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgname, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgname, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_reset(stmt); @@ -1452,7 +1452,7 @@ EAPI char *livebox_service_appid(const char *pkgname) goto out; } - ret = sqlite3_bind_text(stmt, 2, pkgname, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, pkgname, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_reset(stmt); @@ -1538,14 +1538,14 @@ EAPI char *livebox_service_lb_script_path(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); goto out; } - ret = sqlite3_bind_text(stmt, 2, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); @@ -1615,7 +1615,7 @@ EAPI char *livebox_service_lb_script_group(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); @@ -1667,14 +1667,14 @@ EAPI char *livebox_service_pd_script_path(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); goto out; } - ret = sqlite3_bind_text(stmt, 2, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 2, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt); @@ -1743,7 +1743,7 @@ EAPI char *livebox_service_pd_script_group(const char *pkgid) goto out; } - ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL); + ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); sqlite3_finalize(stmt);