X-Git-Url: https://code.wpia.club/?p=cassiopeia.git;a=blobdiff_plain;f=src%2Fio%2FslipBio.cpp;fp=src%2Fio%2FslipBio.cpp;h=8bae55cdd34795590e59b6ecbcc0717ccb38a592;hp=619159f1bc36cab7253a7bd84e669b9b38bd33c8;hb=da9f337a893bd317460118f89efa83a3427f797f;hpb=23987db96db7962a6ee58d1aeda2bd87780ca579 diff --git a/src/io/slipBio.cpp b/src/io/slipBio.cpp index 619159f..8bae55c 100644 --- a/src/io/slipBio.cpp +++ b/src/io/slipBio.cpp @@ -32,7 +32,7 @@ char hexDigit( char c ) { return 'x'; } -std::string toHex( const char* buf, int len ) { +std::string toHex( const char *buf, int len ) { std::string data = "000000"; for( int i = 0; i < len; i++ ) { @@ -57,7 +57,7 @@ SlipBIO::SlipBIO( std::shared_ptr target ) : target( target ), buffe SlipBIO::~SlipBIO() {} -int SlipBIO::write( const char* buf, int num ) { +int SlipBIO::write( const char *buf, int num ) { #ifdef SLIP_IO_DEBUG logger::notef( "slip-out: %s", toHex( buf, num ) ); #endif @@ -77,7 +77,7 @@ int SlipBIO::write( const char* buf, int num ) { } int totalLen = num + badOnes; // 2 - char* targetPtr = ( char* ) malloc( totalLen ); + char *targetPtr = ( char * ) malloc( totalLen ); if( !targetPtr ) { return -1; @@ -129,7 +129,7 @@ int SlipBIO::write( const char* buf, int num ) { return num; } -int SlipBIO::read( char* buf, int size ) { +int SlipBIO::read( char *buf, int size ) { #ifdef UNMASK_DEBUG logger::note( "starting read" ); #endif @@ -222,7 +222,7 @@ int SlipBIO::read( char* buf, int size ) { return len; } -long SlipBIO::ctrl( int cmod, long arg1, void* arg2 ) { +long SlipBIO::ctrl( int cmod, long arg1, void *arg2 ) { ( void ) cmod; ( void ) arg1; ( void ) arg2; @@ -254,7 +254,7 @@ long SlipBIO::ctrl( int cmod, long arg1, void* arg2 ) { return target->ctrl( cmod, arg1, arg2 ); } -const char* SlipBIO::getName() { +const char *SlipBIO::getName() { return "SlipBIO"; }