Fix coding rule
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 15 Mar 2021 08:40:34 +0000 (17:40 +0900)
committer연정현/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <jungh.yeon@samsung.com>
Mon, 15 Mar 2021 22:56:22 +0000 (07:56 +0900)
- Fix coding rule for files below:
  pkginfo_client.cc
  main.cc
  pkg_request.cc
  runner.cc
  worker_thread.cc

Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/client/pkginfo_client.cc
src/server/main.cc
src/server/pkg_request.cc
src/server/runner.cc
src/server/worker_thread.cc

index d52f601..8f4d65a 100644 (file)
@@ -4,6 +4,11 @@
 
 #include "pkginfo_client.hh"
 
+#include <parcel.hh>
+#include <vconf.h>
+
+#include <string>
+
 #include "parcelable_factory.hh"
 #include "get_appinfo_request_handler.hh"
 #include "get_cert_request_handler.hh"
 #include "set_cert_request_handler.hh"
 #include "set_pkginfo_request_handler.hh"
 
-#include <parcel.hh>
-
-#include <vconf.h>
-
 #include "pkgmgrinfo_debug.h"
 
-#include <string>
 
 namespace pkgmgr_client {
 
index 58f6698..d792936 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 #include <unistd.h>
 #include <sys/types.h>
@@ -5,7 +20,6 @@
 #include <sys/signalfd.h>
 #include <signal.h>
 #include <gio/gio.h>
-#include <unistd.h>
 #include <glib-unix.h>
 #include <systemd/sd-daemon.h>
 
index 7cfa918..e86b4b2 100644 (file)
@@ -64,7 +64,7 @@ bool PkgRequest::ReceiveData() {
     request_type_ = pkgmgr_common::REQ_TYPE_NONE;
     return false;
   }
-  ret = socket_->ReceiveData((void*)data_, data_size_);
+  ret = socket_->ReceiveData(reinterpret_cast<void*>(data_), data_size_);
   if (ret < 0) {
     LOGE("Failed to ReceiveData");
     delete[] data_;
index 6ad2d97..919e794 100644 (file)
@@ -62,7 +62,8 @@ int Runner::FdErrorHandler(int fd, GIOCondition cond, void* user_data) {
   if (static_cast<int>(cond) & (G_IO_ERR | G_IO_HUP)) {
     auto it = runner->sid_map_.find(fd);
     if (it != runner->sid_map_.end()) {
-      LOGW("Socket disconnect. fd(%d) condition(%d)", fd, static_cast<int>(cond));
+      LOGW("Socket disconnect. fd(%d) condition(%d)",
+          fd, static_cast<int>(cond));
       g_source_remove(it->second);
       runner->sid_map_.erase(it);
     }
index d7f40e1..e2f616f 100644 (file)
@@ -60,7 +60,8 @@ bool WorkerThread::PushQueue(std::shared_ptr<PkgRequest> req) {
 }
 
 void WorkerThread::Run() {
-  std::unique_ptr<request_handler::AbstractRequestHandler> handler[pkgmgr_common::ReqType::MAX];
+  std::unique_ptr<request_handler::AbstractRequestHandler>
+      handler[pkgmgr_common::ReqType::MAX];
   handler[pkgmgr_common::ReqType::GET_PKG_INFO].reset(
       new request_handler::GetPkginfoRequestHandler());
   handler[pkgmgr_common::ReqType::GET_APP_INFO].reset(
@@ -93,7 +94,8 @@ void WorkerThread::Run() {
       continue;
     }
     pkgmgr_common::ReqType type = req->GetRequestType();
-    LOGD("Request type(%d), pid(%d)", static_cast<int>(type), req->GetSenderPID());
+    LOGD("Request type(%d), pid(%d)",
+        static_cast<int>(type), req->GetSenderPID());
     if (type <= pkgmgr_common::ReqType::REQ_TYPE_NONE
             || type >= pkgmgr_common::ReqType::MAX) {
       LOGE("Request type is invalid (%d)", static_cast<int>(type));