Fix coding style
authorChanggyu Choi <changyu.choi@samsung.com>
Fri, 30 Apr 2021 03:57:03 +0000 (12:57 +0900)
committer최창규/Tizen Platform Lab(SR)/Engineer/삼성전자 <changyu.choi@samsung.com>
Fri, 30 Apr 2021 04:17:23 +0000 (13:17 +0900)
Change-Id: Ifed8405a3c9bc0867319b6250e13fe5aa23f4dde
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/common/socket/abstract_socket.cc
src/common/socket/abstract_socket.hh
src/common/socket/data_socket.cc
src/server/runner.cc

index 594df3a201237d821991346dc30232f5b9837f48..a8e03f0bda8b18c522d0836bb52a5da246355e3d 100644 (file)
@@ -30,7 +30,9 @@ namespace socket {
 AbstractSocket::AbstractSocket(std::string path)
     : path_(std::move(path)), fd_(-1), addr_{} {}
 
-AbstractSocket::AbstractSocket(int fd) : fd_(fd), addr_{} {}
+AbstractSocket::AbstractSocket(int fd) : fd_(fd), addr_{} {
+  GetFdInfo();
+}
 
 AbstractSocket::~AbstractSocket() {
   Disconnect();
index e04b6388f44cb278947877126c4b54741983b7fe..e4160ebde9105f4e2a29197255b97293915c76ac 100644 (file)
@@ -47,6 +47,8 @@ class EXPORT_API AbstractSocket {
  protected:
   void SetOption();
   int Create();
+
+ private:
   void GetFdInfo();
 
  protected:
index 22d47a3161397befd5638cd035e6bb1b5a837347..17993555f216d0eb3e64c7d41101bb196ec50562 100644 (file)
@@ -19,9 +19,7 @@
 namespace pkgmgr_common {
 namespace socket {
 
-DataSocket::DataSocket(int fd) : AbstractSocket(fd) {
-  GetFdInfo();
-}
+DataSocket::DataSocket(int fd) : AbstractSocket(fd) {}
 
 }  // namespace socket
 }  // namespace pkgmgr_common
index 6bcfd8741a1673ccbabc94ed854f3763707a55b3..cece9d949ecd9b7024e694de169a933a2f00e953 100644 (file)
@@ -43,11 +43,10 @@ const char PRIVILEGE_PACKAGE_MANAGER_ADMIN[] = "http://tizen.org/privilege/packa
 
 std::vector<std::string> GetPrivileges(pkgmgr_common::ReqType type) {
   std::vector<std::string> ret;
-  if (type == pkgmgr_common::SET_CERT_INFO) {
+  if (type == pkgmgr_common::SET_CERT_INFO)
     ret.emplace_back(PRIVILEGE_PACKAGE_MANAGER_ADMIN);
-  } else if (type == pkgmgr_common::SET_PKG_INFO) {
+  else if (type == pkgmgr_common::SET_PKG_INFO)
     ret.emplace_back(PRIVILEGE_PACKAGE_MANAGER_ADMIN);
-  }
 
   return ret;
 }