From a68087af829d967f5f68332e69d27283bc88e899 Mon Sep 17 00:00:00 2001 From: Bartlomiej Kunikowski Date: Fri, 11 Aug 2017 10:44:34 +0200 Subject: [PATCH] Perform code style checking fixes Change-Id: If802ce932ed42bf53e11a1f7d5213e48f9794a8c --- src/unit_tests/smoke_test_helper.cc | 4 ++-- src/unit_tests/smoke_utils.cc | 29 ++++++++++++++--------------- src/wgt/step/configuration/step_parse.cc | 6 ++---- src/wgt/step/pkgmgr/step_generate_xml.cc | 3 ++- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/unit_tests/smoke_test_helper.cc b/src/unit_tests/smoke_test_helper.cc index 156b64b..d767cdb 100644 --- a/src/unit_tests/smoke_test_helper.cc +++ b/src/unit_tests/smoke_test_helper.cc @@ -41,8 +41,8 @@ int main(int argc, char** argv) { ci::PkgmgrInstaller pkgmgr_installer; wgt::WgtAppQueryInterface query_interface; - auto pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv, &pkgmgr_installer, - &query_interface); + auto pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv, + &pkgmgr_installer, &query_interface); if (!pkgmgr) { LOG(ERROR) << "Options of pkgmgr installer cannot be parsed"; return EINVAL; diff --git a/src/unit_tests/smoke_utils.cc b/src/unit_tests/smoke_utils.cc index 2a8fb85..fabb37c 100644 --- a/src/unit_tests/smoke_utils.cc +++ b/src/unit_tests/smoke_utils.cc @@ -868,19 +868,18 @@ void UninstallAllSmokeApps(ci::RequestMode request_mode) { } } -int GetAppInstalledTime(const char *appid, uid_t uid) -{ - int ret = 0; - int installed_time = 0; - pkgmgrinfo_appinfo_h handle = NULL; - ret = pkgmgrinfo_appinfo_get_usr_appinfo(appid, uid, &handle); - if (ret != PMINFO_R_OK) - return -1; - ret = pkgmgrinfo_appinfo_get_installed_time(handle, &installed_time); - if (ret != PMINFO_R_OK) { - pkgmgrinfo_appinfo_destroy_appinfo(handle); - return -1; - } - pkgmgrinfo_appinfo_destroy_appinfo(handle); - return installed_time; +int GetAppInstalledTime(const char *appid, uid_t uid) { + int ret = 0; + int installed_time = 0; + pkgmgrinfo_appinfo_h handle = NULL; + ret = pkgmgrinfo_appinfo_get_usr_appinfo(appid, uid, &handle); + if (ret != PMINFO_R_OK) + return -1; + ret = pkgmgrinfo_appinfo_get_installed_time(handle, &installed_time); + if (ret != PMINFO_R_OK) { + pkgmgrinfo_appinfo_destroy_appinfo(handle); + return -1; + } + pkgmgrinfo_appinfo_destroy_appinfo(handle); + return installed_time; } diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index a9e3ca1..fa8bed7 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -65,8 +65,7 @@ const char kTTSCategoryName[] = "http://tizen.org/category/tts"; const char kResWgt[] = "res/wgt"; const char kConfigFileName[] = "config.xml"; -void FreeMetadataList(gpointer data) -{ +void FreeMetadataList(gpointer data) { metadata_x* metadata = reinterpret_cast(data); if (metadata) { if (metadata->key) @@ -325,8 +324,7 @@ bool StepParse::FillWidgetInfo(manifest_x* manifest) { manifest->update = strdup("true"); else manifest->update = strdup("false"); - } - else { + } else { manifest->update = strdup("false"); } diff --git a/src/wgt/step/pkgmgr/step_generate_xml.cc b/src/wgt/step/pkgmgr/step_generate_xml.cc index 6743f2a..404b5c8 100644 --- a/src/wgt/step/pkgmgr/step_generate_xml.cc +++ b/src/wgt/step/pkgmgr/step_generate_xml.cc @@ -525,7 +525,8 @@ void StepGenerateXml::GeneratePrivilege(xmlTextWriterPtr writer) { void StepGenerateXml::GenerateProvidesAppDefinedPrivilege( xmlTextWriterPtr writer) { if (context_->manifest_data.get()->provides_appdefined_privileges) { - xmlTextWriterStartElement(writer, BAD_CAST "provides-appdefined-privileges"); + xmlTextWriterStartElement(writer, + BAD_CAST "provides-appdefined-privileges"); for (appdefined_privilege_x* priv : GListRange( context_->manifest_data.get()->provides_appdefined_privileges)) { xmlTextWriterStartElement(writer, BAD_CAST "appdefined-privilege"); -- 2.7.4