Style cleanup: "foo &x", not "foo& x"
This commit is contained in:
committed by
John Hood
parent
9e9919c941
commit
aeffb71cfc
+2
-2
@@ -74,8 +74,8 @@ namespace Crypto {
|
||||
|
||||
private:
|
||||
/* Not implemented */
|
||||
AlignedBuffer( const AlignedBuffer& );
|
||||
AlignedBuffer& operator=( const AlignedBuffer& );
|
||||
AlignedBuffer( const AlignedBuffer & );
|
||||
AlignedBuffer & operator=( const AlignedBuffer & );
|
||||
};
|
||||
|
||||
class Base64Key {
|
||||
|
||||
@@ -175,13 +175,13 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
client.shutdown();
|
||||
} catch ( const Network::NetworkException& e ) {
|
||||
} catch ( const Network::NetworkException &e ) {
|
||||
fprintf( stderr, "Network exception: %s\r\n",
|
||||
e.what() );
|
||||
} catch ( const Crypto::CryptoException& e ) {
|
||||
} catch ( const Crypto::CryptoException &e ) {
|
||||
fprintf( stderr, "Crypto exception: %s\r\n",
|
||||
e.what() );
|
||||
} catch ( const std::string& s ) {
|
||||
} catch ( const std::string &s ) {
|
||||
fprintf( stderr, "Error: %s\r\n", s.c_str() );
|
||||
}
|
||||
|
||||
|
||||
@@ -310,11 +310,11 @@ int main( int argc, char *argv[] )
|
||||
|
||||
try {
|
||||
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",
|
||||
e.what() );
|
||||
return 1;
|
||||
} catch ( const Crypto::CryptoException& e ) {
|
||||
} catch ( const Crypto::CryptoException &e ) {
|
||||
fprintf( stderr, "Crypto exception: %s\n",
|
||||
e.what() );
|
||||
return 1;
|
||||
@@ -490,10 +490,10 @@ int run_server( const char *desired_ip, const char *desired_port,
|
||||
|
||||
try {
|
||||
serve( master, terminal, *network );
|
||||
} catch ( const Network::NetworkException& e ) {
|
||||
} catch ( const Network::NetworkException &e ) {
|
||||
fprintf( stderr, "Network exception: %s\n",
|
||||
e.what() );
|
||||
} catch ( const Crypto::CryptoException& e ) {
|
||||
} catch ( const Crypto::CryptoException &e ) {
|
||||
fprintf( stderr, "Crypto exception: %s\n",
|
||||
e.what() );
|
||||
}
|
||||
@@ -726,10 +726,10 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
|
||||
}
|
||||
|
||||
network.tick();
|
||||
} catch ( const Network::NetworkException& e ) {
|
||||
} catch ( const Network::NetworkException &e ) {
|
||||
fprintf( stderr, "%s\n", e.what() );
|
||||
spin();
|
||||
} catch ( const Crypto::CryptoException& e ) {
|
||||
} catch ( const Crypto::CryptoException &e ) {
|
||||
if ( e.fatal ) {
|
||||
throw;
|
||||
} else {
|
||||
|
||||
@@ -259,7 +259,7 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
|
||||
if ( desired_ip ) {
|
||||
try {
|
||||
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",
|
||||
desired_ip,
|
||||
e.what() );
|
||||
@@ -269,7 +269,7 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
|
||||
/* now try any local interface */
|
||||
try {
|
||||
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",
|
||||
e.what() );
|
||||
throw; /* this time it's fatal */
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
const Parser::StateFamily Parser::family;
|
||||
|
||||
static void append_or_delete( Parser::Action *act,
|
||||
std::list<Parser::Action *>&vec )
|
||||
std::list<Parser::Action *> &vec )
|
||||
{
|
||||
assert( act );
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Terminal {
|
||||
|| (contents.front() == 0xA0) ) ) );
|
||||
}
|
||||
|
||||
bool contents_match ( const Cell& other ) const
|
||||
bool contents_match ( const Cell &other ) const
|
||||
{
|
||||
return ( is_blank() && other.is_blank() )
|
||||
|| ( contents == other.contents );
|
||||
|
||||
@@ -72,7 +72,7 @@ void test_bad_decrypt( Session &decryption_session ) {
|
||||
bool got_exn = false;
|
||||
try {
|
||||
decryption_session.decrypt( bad_ct );
|
||||
} catch ( const CryptoException& e ) {
|
||||
} catch ( const CryptoException &e ) {
|
||||
got_exn = true;
|
||||
|
||||
/* 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++ ) {
|
||||
try {
|
||||
test_one_session();
|
||||
} catch ( const CryptoException& e ) {
|
||||
} catch ( const CryptoException &e ) {
|
||||
fprintf( stderr, "Crypto exception: %s\r\n",
|
||||
e.what() );
|
||||
fatal_assert( false );
|
||||
|
||||
Reference in New Issue
Block a user