From 6d5ef60c6faa649c5f8a2674e178d26c92e74acf Mon Sep 17 00:00:00 2001 From: Piotr Ganicz Date: Fri, 30 Sep 2016 11:24:43 +0200 Subject: [PATCH] Coding style Change-Id: Ib507c02e3202cd96df63a1fddf8d51fa8cb7f163 --- src/wgt/step/configuration/step_parse.cc | 4 +++- src/wgt/step/encryption/step_encrypt_resources.cc | 6 +++--- src/wgt/step/filesystem/step_wgt_patch_icons.cc | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index c6bf723..c15d8af 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include "wgt/wgt_backend_data.h" @@ -77,7 +78,8 @@ void AppendWidgetMetadata(GList** metadatas, const std::vector> metadata) { GList* list = *metadatas; for (auto& meta : metadata) { - metadata_x* new_meta = static_cast(calloc(1, sizeof(metadata_x))); + metadata_x* new_meta = + static_cast(calloc(1, sizeof(metadata_x))); new_meta->key = strdup(meta.first.c_str()); if (!meta.second.empty()) new_meta->value = strdup(meta.second.c_str()); diff --git a/src/wgt/step/encryption/step_encrypt_resources.cc b/src/wgt/step/encryption/step_encrypt_resources.cc index b2ec518..d7d2e9a 100644 --- a/src/wgt/step/encryption/step_encrypt_resources.cc +++ b/src/wgt/step/encryption/step_encrypt_resources.cc @@ -23,7 +23,7 @@ namespace { -const std::size_t kEncryptionChunkMaxSize = 8_kB; // bytes +const std::size_t kEncryptionChunkMaxSize = 8_kB; // bytes const std::set encryptSet { ".html", ".htm", ".css", ".js"}; FILE* OpenFile(const std::string& path, const std::string& mode) { @@ -191,7 +191,8 @@ bool StepEncryptResources::EncryptFile(const bf::path &src) { size_t encrypted_size = 0; // TODO(p.sikorski) check if it is Preloaded int ret; - if (context_->request_mode.get() == common_installer::RequestMode::GLOBAL) { + if (context_->request_mode.get() + == common_installer::RequestMode::GLOBAL) { ret = wae_encrypt_global_web_application( context_->pkgid.get().c_str(), context_->is_preload_request.get() ? @@ -255,7 +256,6 @@ bool StepEncryptResources::EncryptFile(const bf::path &src) { free(encrypted_data); } inChunk.reset(new unsigned char[chunkSize]); - } while (!std::feof(input)); fclose(output); diff --git a/src/wgt/step/filesystem/step_wgt_patch_icons.cc b/src/wgt/step/filesystem/step_wgt_patch_icons.cc index c01c1c8..ade10df 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_icons.cc +++ b/src/wgt/step/filesystem/step_wgt_patch_icons.cc @@ -60,7 +60,8 @@ common_installer::Step::Status StepWgtPatchIcons::process() { // create default icon if there is no icon at all bf::path icon_path = common_icon_location / app->appid; icon_path += ".png"; - bf::copy_file(kDefaultIconPath, icon_path, bf::copy_option::overwrite_if_exists, error); + bf::copy_file(kDefaultIconPath, icon_path, + bf::copy_option::overwrite_if_exists, error); if (error) { LOG(ERROR) << "Failed to create default icon for web application"; return Status::ICON_ERROR; -- 2.7.4