Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/crypto/ae.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef struct _ae_ctx ae_ctx;
ae_ctx* ae_allocate( void* misc ); /* Allocate ae_ctx, set optional ptr */
void ae_free( ae_ctx* ctx ); /* Deallocate ae_ctx struct */
int ae_clear( ae_ctx* ctx ); /* Undo initialization */
int ae_ctx_sizeof( void ); /* Return sizeof(ae_ctx) */
int ae_ctx_sizeof(); /* Return sizeof(ae_ctx) */
/* ae_allocate() allocates an ae_ctx structure, but does not initialize it.
* ae_free() deallocates an ae_ctx structure, but does not zeroize it.
* ae_clear() zeroes sensitive values associated with an ae_ctx structure
Expand Down
10 changes: 5 additions & 5 deletions src/crypto/crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ long int myatoi( const char* str )
return ret;
}

uint64_t Crypto::unique( void )
uint64_t Crypto::unique()
{
static uint64_t counter = 0;
uint64_t rv = counter++;
Expand Down Expand Up @@ -138,7 +138,7 @@ Base64Key::Base64Key( PRNG& prng )
prng.fill( key, sizeof( key ) );
}

std::string Base64Key::printable_key( void ) const
std::string Base64Key::printable_key() const
{
char base64[24];

Expand Down Expand Up @@ -174,7 +174,7 @@ Nonce::Nonce( uint64_t val )
memcpy( bytes + 4, &val_net, 8 );
}

uint64_t Nonce::val( void ) const
uint64_t Nonce::val() const
{
uint64_t ret;
memcpy( &ret, bytes + 4, 8 );
Expand Down Expand Up @@ -285,7 +285,7 @@ static rlim_t saved_core_rlimit;

/* Disable dumping core, as a precaution to avoid saving sensitive data
to disk. */
void Crypto::disable_dumping_core( void )
void Crypto::disable_dumping_core()
{
struct rlimit limit;
if ( 0 != getrlimit( RLIMIT_CORE, &limit ) ) {
Expand All @@ -303,7 +303,7 @@ void Crypto::disable_dumping_core( void )
}
}

void Crypto::reenable_dumping_core( void )
void Crypto::reenable_dumping_core()
{
/* Silent failure is safe. */
struct rlimit limit;
Expand Down
20 changes: 10 additions & 10 deletions src/crypto/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CryptoException : public std::exception
* numbers that never repeats its output. Enforce that with this
* function.
*/
uint64_t unique( void );
uint64_t unique();

/* 16-byte-aligned buffer, with length. */
class AlignedBuffer
Expand All @@ -76,8 +76,8 @@ class AlignedBuffer

~AlignedBuffer() { free( m_allocated ); }

char* data( void ) const { return m_data; }
size_t len( void ) const { return m_len; }
char* data() const { return m_data; }
size_t len() const { return m_len; }

private:
/* Not implemented */
Expand All @@ -94,8 +94,8 @@ class Base64Key
Base64Key(); /* random key */
Base64Key( PRNG& prng );
Base64Key( std::string printable_key );
std::string printable_key( void ) const;
unsigned char* data( void ) { return key; }
std::string printable_key() const;
unsigned char* data() { return key; }
};

class Nonce
Expand All @@ -110,9 +110,9 @@ class Nonce
Nonce( uint64_t val );
Nonce( const char* s_bytes, size_t len );

std::string cc_str( void ) const { return std::string( bytes + 4, 8 ); }
const char* data( void ) const { return bytes; }
uint64_t val( void ) const;
std::string cc_str() const { return std::string( bytes + 4, 8 ); }
const char* data() const { return bytes; }
uint64_t val() const;
};

class Message
Expand Down Expand Up @@ -156,8 +156,8 @@ class Session
Session& operator=( const Session& );
};

void disable_dumping_core( void );
void reenable_dumping_core( void );
void disable_dumping_core();
void reenable_dumping_core();
}

#endif
2 changes: 1 addition & 1 deletion src/frontend/mosh-client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void print_usage( FILE* file, const char* argv0 )
argv0 );
}

static void print_colorcount( void )
static void print_colorcount()
{
/* check colors */
setupterm( (char*)0, 1, (int*)0 );
Expand Down
12 changes: 6 additions & 6 deletions src/frontend/mosh-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ static void print_usage( FILE* stream, const char* argv0 )
}

static bool print_motd( const char* filename );
static void chdir_homedir( void );
static bool motd_hushed( void );
static void chdir_homedir();
static bool motd_hushed();
static void warn_unattached( const std::string& ignore_entry );

/* Simple spinloop */
static void spin( void )
static void spin()
{
static unsigned int spincount = 0;
spincount++;
Expand All @@ -149,7 +149,7 @@ static void spin( void )
}
}

static std::string get_SSH_IP( void )
static std::string get_SSH_IP()
{
const char* SSH_CONNECTION = getenv( "SSH_CONNECTION" );
if ( !SSH_CONNECTION ) { /* Older sshds don't set this */
Expand Down Expand Up @@ -990,7 +990,7 @@ static bool print_motd( const char* filename )
return true;
}

static void chdir_homedir( void )
static void chdir_homedir()
{
const char* home = getenv( "HOME" );
if ( home == NULL ) {
Expand All @@ -1011,7 +1011,7 @@ static void chdir_homedir( void )
}
}

static bool motd_hushed( void )
static bool motd_hushed()
{
/* must be in home directory already */
struct stat buf;
Expand Down
16 changes: 8 additions & 8 deletions src/frontend/stmclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

#include "src/network/networktransport-impl.h"

void STMClient::resume( void )
void STMClient::resume()
{
/* Restore termios state */
if ( tcsetattr( STDIN_FILENO, TCSANOW, &raw_termios ) < 0 ) {
Expand All @@ -79,7 +79,7 @@ void STMClient::resume( void )
repaint_requested = true;
}

void STMClient::init( void )
void STMClient::init()
{
if ( !is_utf8_locale() ) {
LocaleVar native_ctype = get_ctype();
Expand Down Expand Up @@ -201,7 +201,7 @@ void STMClient::init( void )
connecting_notification = std::wstring( tmp );
}

void STMClient::shutdown( void )
void STMClient::shutdown()
{
/* Restore screen state */
overlays.get_notification_engine().set_notification_string( std::wstring( L"" ) );
Expand Down Expand Up @@ -233,7 +233,7 @@ void STMClient::shutdown( void )
}
}

void STMClient::main_init( void )
void STMClient::main_init()
{
Select& sel = Select::get_instance();
sel.add_signal( SIGWINCH );
Expand Down Expand Up @@ -272,7 +272,7 @@ void STMClient::main_init( void )
Select::set_verbose( verbose );
}

void STMClient::output_new_frame( void )
void STMClient::output_new_frame()
{
if ( !network ) { /* clean shutdown even when not initialized */
return;
Expand All @@ -293,7 +293,7 @@ void STMClient::output_new_frame( void )
local_framebuffer = new_state;
}

void STMClient::process_network_input( void )
void STMClient::process_network_input()
{
network->recv();

Expand Down Expand Up @@ -407,7 +407,7 @@ bool STMClient::process_user_input( int fd )
return true;
}

bool STMClient::process_resize( void )
bool STMClient::process_resize()
{
/* get new size */
if ( ioctl( STDIN_FILENO, TIOCGWINSZ, &window_size ) < 0 ) {
Expand All @@ -430,7 +430,7 @@ bool STMClient::process_resize( void )
return true;
}

bool STMClient::main( void )
bool STMClient::main()
{
/* initialize signal handling and structures */
main_init();
Expand Down
18 changes: 9 additions & 9 deletions src/frontend/stmclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ class STMClient
bool clean_shutdown;
unsigned int verbose;

void main_init( void );
void process_network_input( void );
void main_init();
void process_network_input();
bool process_user_input( int fd );
bool process_resize( void );
bool process_resize();

void output_new_frame( void );
void output_new_frame();

bool still_connecting( void ) const
bool still_connecting() const
{
/* Initially, network == NULL */
return network && ( network->get_remote_state_num() == 0 );
}

void resume( void ); /* restore state after SIGCONT */
void resume(); /* restore state after SIGCONT */

public:
STMClient( const char* s_ip,
Expand Down Expand Up @@ -121,9 +121,9 @@ class STMClient
}
}

void init( void );
void shutdown( void );
bool main( void );
void init();
void shutdown();
bool main();

/* unused */
STMClient( const STMClient& );
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/terminaloverlay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ void NotificationEngine::apply( Framebuffer& fb ) const
}
}

void NotificationEngine::adjust_message( void )
void NotificationEngine::adjust_message()
{
if ( timestamp() >= message_expiration ) {
message.clear();
}
}

int NotificationEngine::wait_time( void ) const
int NotificationEngine::wait_time() const
{
uint64_t next_expiry = INT_MAX;

Expand Down Expand Up @@ -390,7 +390,7 @@ void PredictionEngine::kill_epoch( uint64_t epoch, const Framebuffer& fb )
become_tentative();
}

void PredictionEngine::reset( void )
void PredictionEngine::reset()
{
cursors.clear();
overlays.clear();
Expand Down Expand Up @@ -862,7 +862,7 @@ void PredictionEngine::newline_carriage_return( const Framebuffer& fb )
}
}

void PredictionEngine::become_tentative( void )
void PredictionEngine::become_tentative()
{
if ( display_preference != Experimental ) {
prediction_epoch++;
Expand All @@ -874,7 +874,7 @@ void PredictionEngine::become_tentative( void )
*/
}

bool PredictionEngine::active( void ) const
bool PredictionEngine::active() const
{
if ( !cursors.empty() ) {
return true;
Expand Down
Loading
Loading