From 2d3861c7e88a9f11097476bb62156de0e985df3f Mon Sep 17 00:00:00 2001 From: Gymee <8039110+Gymee@user.noreply.gitee.com> Date: Fri, 18 Sep 2020 18:01:46 +0800 Subject: [PATCH] remove redudant extern "C" in .c file --- src/appspawn_adapter.c | 12 ------------ src/appspawn_message.c | 14 +------------- src/appspawn_process.c | 14 +------------- src/appspawn_service.c | 14 +------------- 4 files changed, 3 insertions(+), 51 deletions(-) diff --git a/src/appspawn_adapter.c b/src/appspawn_adapter.c index 9c56c0a..4b1de42 100755 --- a/src/appspawn_adapter.c +++ b/src/appspawn_adapter.c @@ -16,12 +16,6 @@ #include #include -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - int KeepCapability() { #ifdef __LINUX__ @@ -32,9 +26,3 @@ int KeepCapability() #endif return 0; } - -#ifdef __cplusplus -#if __cplusplus -} -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ diff --git a/src/appspawn_message.c b/src/appspawn_message.c index d06c980..fe2b5ca 100755 --- a/src/appspawn_message.c +++ b/src/appspawn_message.c @@ -22,12 +22,6 @@ #include "ohos_errno.h" #include "securec.h" -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - static const size_t MAX_BUNDLE_NAME_LEN = 127; static const size_t MIN_BUNDLE_NAME_LEN = 7; static const size_t MAX_SHARED_LIB_PATH_LEN = 2048; @@ -144,10 +138,4 @@ int SplitMessage(const char* msg, unsigned int msgLen, MessageSt* msgSt) return EC_PROTOCOL; } return EC_SUCCESS; -} - -#ifdef __cplusplus -#if __cplusplus -} -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ +} \ No newline at end of file diff --git a/src/appspawn_process.c b/src/appspawn_process.c index 31f0312..a8c9377 100755 --- a/src/appspawn_process.c +++ b/src/appspawn_process.c @@ -23,12 +23,6 @@ #include "log.h" #include "securec.h" -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - #define DEFAULT_UMASK 022 #define CAP_NUM 2 #define ABILITY_EXE_FILE_FULL_PATH "/bin/abilityMain" @@ -174,10 +168,4 @@ pid_t CreateProcess(const MessageSt* msgSt) free(envStr); return newPID; -} - -#ifdef __cplusplus -#if __cplusplus -} -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ +} \ No newline at end of file diff --git a/src/appspawn_service.c b/src/appspawn_service.c index 3415d9a..eabc3ea 100755 --- a/src/appspawn_service.c +++ b/src/appspawn_service.c @@ -26,12 +26,6 @@ #include "samgr_lite.h" #include "service.h" -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - static const int INVALID_PID = -1; typedef struct AppSpawnFeatureApi { @@ -159,10 +153,4 @@ void AppSpawnInit(void) HILOG_INFO(HILOG_MODULE_HIVIEW, "[appspawn] register featureapi succeed."); } -SYSEX_SERVICE_INIT(AppSpawnInit); - -#ifdef __cplusplus -#if __cplusplus -} -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ +SYSEX_SERVICE_INIT(AppSpawnInit); \ No newline at end of file -- Gitee