summaryrefslogtreecommitdiff
path: root/indra/media_plugins/base
diff options
context:
space:
mode:
authorAiraYumi <aira.youme@airanyumi.net>2024-05-21 20:52:38 -0400
committerMaki <maki@hotmilk.space>2024-05-24 17:55:09 -0400
commitbdf46af9aff96a749dcf2612a2bdc6e8e394971e (patch)
treea96213e1aa21920e38f13e69d574b7c8c5e5d579 /indra/media_plugins/base
parent8789d372c7617d86a30395190db4dba3b8545226 (diff)
fix "lines starting with tabs found"
Diffstat (limited to 'indra/media_plugins/base')
-rw-r--r--indra/media_plugins/base/media_plugin_base.cpp70
-rw-r--r--indra/media_plugins/base/media_plugin_base.h8
2 files changed, 39 insertions, 39 deletions
diff --git a/indra/media_plugins/base/media_plugin_base.cpp b/indra/media_plugins/base/media_plugin_base.cpp
index b57421f077..b21f29ac32 100644
--- a/indra/media_plugins/base/media_plugin_base.cpp
+++ b/indra/media_plugins/base/media_plugin_base.cpp
@@ -258,46 +258,46 @@ int WINAPI DllEntryPoint( HINSTANCE hInstance, unsigned long reason, void* param
#if LL_LINUX
pid_t getParentPid( pid_t aPid )
{
- std::stringstream strm;
- strm << "/proc/" << aPid << "/status";
- std::ifstream in{ strm.str() };
-
- if( !in.is_open() )
- return 0;
-
- pid_t res {0};
- while( !in.eof() && res == 0 )
- {
- std::string line;
- line.resize( 1024, 0 );
- in.getline( &line[0], line.length() );
-
- auto i = line.find( "PPid:" );
-
- if( i == std::string::npos )
- continue;
-
- char const *pIn = line.c_str() + 5; // Skip over pid;
- while( *pIn != 0 && isspace( *pIn ) )
- ++pIn;
-
- if( *pIn )
- res = atoll( pIn );
- }
- return res;
+ std::stringstream strm;
+ strm << "/proc/" << aPid << "/status";
+ std::ifstream in{ strm.str() };
+
+ if( !in.is_open() )
+ return 0;
+
+ pid_t res {0};
+ while( !in.eof() && res == 0 )
+ {
+ std::string line;
+ line.resize( 1024, 0 );
+ in.getline( &line[0], line.length() );
+
+ auto i = line.find( "PPid:" );
+
+ if( i == std::string::npos )
+ continue;
+
+ char const *pIn = line.c_str() + 5; // Skip over pid;
+ while( *pIn != 0 && isspace( *pIn ) )
+ ++pIn;
+
+ if( *pIn )
+ res = atoll( pIn );
+ }
+ return res;
}
bool isPluginPid( pid_t aPid )
{
- auto myPid = getpid();
+ auto myPid = getpid();
- do
- {
- if( aPid == myPid )
- return true;
- aPid = getParentPid( aPid );
- } while( aPid > 1 );
+ do
+ {
+ if( aPid == myPid )
+ return true;
+ aPid = getParentPid( aPid );
+ } while( aPid > 1 );
- return false;
+ return false;
}
#endif
diff --git a/indra/media_plugins/base/media_plugin_base.h b/indra/media_plugins/base/media_plugin_base.h
index 1f8fcf98ee..a084fc9834 100644
--- a/indra/media_plugins/base/media_plugin_base.h
+++ b/indra/media_plugins/base/media_plugin_base.h
@@ -61,10 +61,10 @@ extern SymbolGrabber gSymbolGrabber;
// extern SymbolGrabber gSymbolGrabber;
#define LL_GRAB_SYM(SYMBOL_GRABBER, REQUIRED, SYMBOL_NAME, RETURN, ...) \
- RETURN (*ll##SYMBOL_NAME)(__VA_ARGS__) = nullptr; \
- size_t gRegistered##SYMBOL_NAME = SYMBOL_GRABBER.registerSymbol( \
- { REQUIRED, #SYMBOL_NAME , (apr_dso_handle_sym_t*)&ll##SYMBOL_NAME} \
- );
+ RETURN (*ll##SYMBOL_NAME)(__VA_ARGS__) = nullptr; \
+ size_t gRegistered##SYMBOL_NAME = SYMBOL_GRABBER.registerSymbol( \
+ { REQUIRED, #SYMBOL_NAME , (apr_dso_handle_sym_t*)&ll##SYMBOL_NAME} \
+ );
#endif