diff --git a/BUILD.gn b/BUILD.gn old mode 100755 new mode 100644 diff --git a/README_zh.md b/README_zh.md old mode 100755 new mode 100644 diff --git a/appspawn.cfg b/appspawn.cfg old mode 100755 new mode 100644 diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn old mode 100755 new mode 100644 diff --git a/interfaces/innerkits/include/client_socket.h b/interfaces/innerkits/include/client_socket.h index dc459bc778869272552f405f535ea73936cb30df..85e979a6e27909a0c65bcbe8464253ba7c293a79 100644 --- a/interfaces/innerkits/include/client_socket.h +++ b/interfaces/innerkits/include/client_socket.h @@ -29,7 +29,7 @@ public: explicit ClientSocket(const std::string &client); /** - * Destructor used to destory a ClientSocket + * Destructor used to destroy a ClientSocket */ virtual ~ClientSocket() = default; diff --git a/src/appspawn_server.cpp b/src/appspawn_server.cpp index df76ef36ff3d2135a70918934f127807ab98021d..e8f61665e985ecdfcad767dd817f895ac4081ff8 100644 --- a/src/appspawn_server.cpp +++ b/src/appspawn_server.cpp @@ -298,7 +298,7 @@ int AppSpawnServer::DoColdStartApp(ClientSocket::AppProperty *appProperty, int f extractedCmds.push_back(nullptr); APPSPAWN_LOGI("DoColdStartApp extractedCmds %d", extractedCmds.size()); int ret = execv(extractedCmds[0], extractedCmds.data()); - if (ret != 0) { + if (ret) { HiLog::Error(LABEL, "Failed to execv, errno = %{public}d", errno); NotifyResToParentProc(fd, -1); } @@ -386,7 +386,7 @@ bool AppSpawnServer::ServerMain(char *longProcName, int64_t longProcNameLen) ClientSocket::AppProperty *appProperty = msg->GetMsg(); pid_t pid = 0; int ret = StartApp(longProcName, longProcNameLen, appProperty, connectFd, pid); - if (ret != 0) { + if (ret) { msg->Response(ret); } else { msg->Response(pid); @@ -723,7 +723,7 @@ int32_t AppSpawnServer::DoSandboxRootFolderCreateAdapt(std::string sandboxPackag } // bind mount "/" to /mnt/sandbox/ path - // rootfs: to do more resouces bind mount here to get more strict resources constraints + // rootfs: to do more resources bind mount here to get more strict resources constraints rc = mount("/", sandboxPackagePath.c_str(), NULL, MS_BIND | MS_REC, NULL); if (rc) { HiLog::Error(LABEL, "mount bind / failed"); @@ -867,7 +867,7 @@ void AppSpawnServer::SetAppAccessToken(const ClientSocket::AppProperty *appPrope #ifdef WITH_SELINUX HapContext hapContext; ret = hapContext.HapDomainSetcontext(appProperty->apl, appProperty->processName); - if (ret != 0) { + if (ret) { HiLog::Error(LABEL, "AppSpawnServer::Failed to hap domain set context, errno = %{public}d %{public}s", errno, appProperty->apl); } else { diff --git a/src/include/appspawn_msg_peer.h b/src/include/appspawn_msg_peer.h index 0aa10c1999737cfaadcc2e180e890e8f6074e0be..d81b124df96ad2ed6dbb3b8c4f63c87d917c5bcc 100644 --- a/src/include/appspawn_msg_peer.h +++ b/src/include/appspawn_msg_peer.h @@ -37,7 +37,7 @@ public: AppSpawnMsgPeer(const std::shared_ptr &socket, int connectFd); /** - * Destructor used to destory a AppSpawnMsgPeer + * Destructor used to destroy a AppSpawnMsgPeer */ ~AppSpawnMsgPeer(); diff --git a/src/include/appspawn_server.h b/src/include/appspawn_server.h index 694b3e438af80535e6b63f33ac0c12cdca857470..09eb0fad61935453a53add3b4eb37f71b2923506 100644 --- a/src/include/appspawn_server.h +++ b/src/include/appspawn_server.h @@ -39,7 +39,7 @@ public: explicit AppSpawnServer(const std::string &socketName); /** - * Destructor used to destory a AppSpawnServer + * Destructor used to destroy a AppSpawnServer */ ~AppSpawnServer() = default; @@ -93,7 +93,7 @@ private: void ConnectionPeer(); /** - * Sets a name for an applicaiton process. + * Sets a name for an application process. * * @param longProcName Indicates the length of long process name. * @param longProcNameLen Indicates the long process name. diff --git a/src/include/server_socket.h b/src/include/server_socket.h index 84c965cf7b1dff6b4f6b6e199bf61f332f80613b..8bfe2ce46ba9fc67962dd2ad69e6ef665909ccec 100644 --- a/src/include/server_socket.h +++ b/src/include/server_socket.h @@ -34,7 +34,7 @@ public: explicit ServerSocket(const std::string &server); /** - * Destructor used to destory a ServerSocket + * Destructor used to destroy a ServerSocket */ virtual ~ServerSocket(); diff --git a/src/socket/appspawn_socket.cpp b/src/socket/appspawn_socket.cpp old mode 100755 new mode 100644 diff --git a/test/unittest/app_spawn_server_test/BUILD.gn b/test/unittest/app_spawn_server_test/BUILD.gn old mode 100755 new mode 100644