Mark local functions as static

This helps to catch unused functions like the former mosh_read_line,
allows the compiler to make better inlining decisions, and reduces the
binary size a bit.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2014-04-23 16:31:27 -04:00
committed by John Hood
parent a52b095f50
commit cd2ae36f36
7 changed files with 88 additions and 88 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ bool verbose = false;
#define NONCE_FMT "%016"PRIx64
std::string random_payload( void ) {
static std::string random_payload( void ) {
const size_t len = prng.uint32() % MESSAGE_SIZE_MAX;
char *buf = new char[len];
prng.fill( buf, len );
@@ -66,7 +66,7 @@ std::string random_payload( void ) {
return payload;
}
void test_bad_decrypt( Session &decryption_session ) {
static void test_bad_decrypt( Session &decryption_session ) {
std::string bad_ct = random_payload();
bool got_exn = false;
@@ -87,7 +87,7 @@ void test_bad_decrypt( Session &decryption_session ) {
}
/* Generate a single key and initial nonce, then perform some encryptions. */
void test_one_session( void ) {
static void test_one_session( void ) {
Base64Key key;
Session encryption_session( key );
Session decryption_session( key );