Style cleanup: "foo &x", not "foo& x"

This commit is contained in:
Geoffrey Thomas
2013-08-03 17:34:48 -07:00
committed by John Hood
parent 9e9919c941
commit aeffb71cfc
7 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -74,8 +74,8 @@ namespace Crypto {
private: private:
/* Not implemented */ /* Not implemented */
AlignedBuffer( const AlignedBuffer& ); AlignedBuffer( const AlignedBuffer & );
AlignedBuffer& operator=( const AlignedBuffer& ); AlignedBuffer & operator=( const AlignedBuffer & );
}; };
class Base64Key { class Base64Key {
+3 -3
View File
@@ -175,13 +175,13 @@ int main( int argc, char *argv[] )
} }
client.shutdown(); client.shutdown();
} catch ( const Network::NetworkException& e ) { } catch ( const Network::NetworkException &e ) {
fprintf( stderr, "Network exception: %s\r\n", fprintf( stderr, "Network exception: %s\r\n",
e.what() ); e.what() );
} catch ( const Crypto::CryptoException& e ) { } catch ( const Crypto::CryptoException &e ) {
fprintf( stderr, "Crypto exception: %s\r\n", fprintf( stderr, "Crypto exception: %s\r\n",
e.what() ); e.what() );
} catch ( const std::string& s ) { } catch ( const std::string &s ) {
fprintf( stderr, "Error: %s\r\n", s.c_str() ); fprintf( stderr, "Error: %s\r\n", s.c_str() );
} }
+6 -6
View File
@@ -310,11 +310,11 @@ int main( int argc, char *argv[] )
try { try {
return run_server( desired_ip, desired_port, command_path, command_argv, colors, verbose, with_motd ); return run_server( desired_ip, desired_port, command_path, command_argv, colors, verbose, with_motd );
} catch ( const Network::NetworkException& e ) { } catch ( const Network::NetworkException &e ) {
fprintf( stderr, "Network exception: %s\n", fprintf( stderr, "Network exception: %s\n",
e.what() ); e.what() );
return 1; return 1;
} catch ( const Crypto::CryptoException& e ) { } catch ( const Crypto::CryptoException &e ) {
fprintf( stderr, "Crypto exception: %s\n", fprintf( stderr, "Crypto exception: %s\n",
e.what() ); e.what() );
return 1; return 1;
@@ -490,10 +490,10 @@ int run_server( const char *desired_ip, const char *desired_port,
try { try {
serve( master, terminal, *network ); serve( master, terminal, *network );
} catch ( const Network::NetworkException& e ) { } catch ( const Network::NetworkException &e ) {
fprintf( stderr, "Network exception: %s\n", fprintf( stderr, "Network exception: %s\n",
e.what() ); e.what() );
} catch ( const Crypto::CryptoException& e ) { } catch ( const Crypto::CryptoException &e ) {
fprintf( stderr, "Crypto exception: %s\n", fprintf( stderr, "Crypto exception: %s\n",
e.what() ); e.what() );
} }
@@ -726,10 +726,10 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
} }
network.tick(); network.tick();
} catch ( const Network::NetworkException& e ) { } catch ( const Network::NetworkException &e ) {
fprintf( stderr, "%s\n", e.what() ); fprintf( stderr, "%s\n", e.what() );
spin(); spin();
} catch ( const Crypto::CryptoException& e ) { } catch ( const Crypto::CryptoException &e ) {
if ( e.fatal ) { if ( e.fatal ) {
throw; throw;
} else { } else {
+2 -2
View File
@@ -259,7 +259,7 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
if ( desired_ip ) { if ( desired_ip ) {
try { try {
if ( try_bind( desired_ip, desired_port_low, desired_port_high ) ) { return; } if ( try_bind( desired_ip, desired_port_low, desired_port_high ) ) { return; }
} catch ( const NetworkException& e ) { } catch ( const NetworkException &e ) {
fprintf( stderr, "Error binding to IP %s: %s\n", fprintf( stderr, "Error binding to IP %s: %s\n",
desired_ip, desired_ip,
e.what() ); e.what() );
@@ -269,7 +269,7 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
/* now try any local interface */ /* now try any local interface */
try { try {
if ( try_bind( NULL, desired_port_low, desired_port_high ) ) { return; } if ( try_bind( NULL, desired_port_low, desired_port_high ) ) { return; }
} catch ( const NetworkException& e ) { } catch ( const NetworkException &e ) {
fprintf( stderr, "Error binding to any interface: %s\n", fprintf( stderr, "Error binding to any interface: %s\n",
e.what() ); e.what() );
throw; /* this time it's fatal */ throw; /* this time it's fatal */
+1 -1
View File
@@ -41,7 +41,7 @@
const Parser::StateFamily Parser::family; const Parser::StateFamily Parser::family;
static void append_or_delete( Parser::Action *act, static void append_or_delete( Parser::Action *act,
std::list<Parser::Action *>&vec ) std::list<Parser::Action *> &vec )
{ {
assert( act ); assert( act );
+1 -1
View File
@@ -111,7 +111,7 @@ namespace Terminal {
|| (contents.front() == 0xA0) ) ) ); || (contents.front() == 0xA0) ) ) );
} }
bool contents_match ( const Cell& other ) const bool contents_match ( const Cell &other ) const
{ {
return ( is_blank() && other.is_blank() ) return ( is_blank() && other.is_blank() )
|| ( contents == other.contents ); || ( contents == other.contents );
+2 -2
View File
@@ -72,7 +72,7 @@ void test_bad_decrypt( Session &decryption_session ) {
bool got_exn = false; bool got_exn = false;
try { try {
decryption_session.decrypt( bad_ct ); decryption_session.decrypt( bad_ct );
} catch ( const CryptoException& e ) { } catch ( const CryptoException &e ) {
got_exn = true; got_exn = true;
/* The "bad decrypt" exception needs to be non-fatal, otherwise we are /* The "bad decrypt" exception needs to be non-fatal, otherwise we are
@@ -142,7 +142,7 @@ int main( int argc, char *argv[] ) {
for ( size_t i=0; i<NUM_SESSIONS; i++ ) { for ( size_t i=0; i<NUM_SESSIONS; i++ ) {
try { try {
test_one_session(); test_one_session();
} catch ( const CryptoException& e ) { } catch ( const CryptoException &e ) {
fprintf( stderr, "Crypto exception: %s\r\n", fprintf( stderr, "Crypto exception: %s\r\n",
e.what() ); e.what() );
fatal_assert( false ); fatal_assert( false );