aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHubert Chathi <[email protected]>2018-06-28 17:13:52 -0400
committerHubert Chathi <[email protected]>2018-06-28 17:13:52 -0400
commitdac2c1064e6777c2bade517fd92d95669a897702 (patch)
tree81480943b91e88e9cab5bab3db34f9a804c16179
parentf709b062bb8dfebff3dd428fe468cf15a864c7fd (diff)
downloadolm-dac2c1064e6777c2bade517fd92d95669a897702.tar.gz
olm-dac2c1064e6777c2bade517fd92d95669a897702.tar.bz2
olm-dac2c1064e6777c2bade517fd92d95669a897702.zip
use void in type signatures for functions with no arguments
-rw-r--r--include/olm/pk.h8
-rw-r--r--src/pk.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/include/olm/pk.h b/include/olm/pk.h
index d2e031e..1f3f9ff 100644
--- a/include/olm/pk.h
+++ b/include/olm/pk.h
@@ -26,7 +26,7 @@ extern "C" {
typedef struct OlmPkEncryption OlmPkEncryption;
/* The size of an encryption object in bytes */
-size_t olm_pk_encryption_size();
+size_t olm_pk_encryption_size(void);
/** Initialise an encryption object using the supplied memory
* The supplied memory must be at least olm_pk_encryption_size() bytes */
@@ -64,7 +64,7 @@ size_t olm_pk_mac_length(
);
/** Get the length of a public or ephemeral key */
-size_t olm_pk_key_length();
+size_t olm_pk_key_length(void);
/** The number of random bytes needed to encrypt a message. */
size_t olm_pk_encrypt_random_length(
@@ -89,7 +89,7 @@ size_t olm_pk_encrypt(
typedef struct OlmPkDecryption OlmPkDecryption;
/* The size of a decryption object in bytes */
-size_t olm_pk_decryption_size();
+size_t olm_pk_decryption_size(void);
/** Initialise a decryption object using the supplied memory
* The supplied memory must be at least olm_pk_decryption_size() bytes */
@@ -109,7 +109,7 @@ size_t olm_clear_pk_decryption(
);
/** The number of random bytes needed to generate a new key. */
-size_t olm_pk_generate_key_random_length();
+size_t olm_pk_generate_key_random_length(void);
/** Generate a new key to use for decrypting messages. The associated public
* key will be written to the pubkey buffer. Returns olm_error() on failure. If
diff --git a/src/pk.cpp b/src/pk.cpp
index 1925d7e..b8fe95b 100644
--- a/src/pk.cpp
+++ b/src/pk.cpp
@@ -43,7 +43,7 @@ const char * olm_pk_encryption_last_error(
return _olm_error_to_string(error);
}
-size_t olm_pk_encryption_size() {
+size_t olm_pk_encryption_size(void) {
return sizeof(OlmPkEncryption);
}
@@ -155,7 +155,7 @@ const char * olm_pk_decryption_last_error(
return _olm_error_to_string(error);
}
-size_t olm_pk_decryption_size() {
+size_t olm_pk_decryption_size(void) {
return sizeof(OlmPkDecryption);
}
@@ -176,11 +176,11 @@ size_t olm_clear_pk_decryption(
return sizeof(OlmPkDecryption);
}
-size_t olm_pk_generate_key_random_length() {
+size_t olm_pk_generate_key_random_length(void) {
return CURVE25519_KEY_LENGTH;
}
-size_t olm_pk_key_length() {
+size_t olm_pk_key_length(void) {
return olm::encode_base64_length(CURVE25519_KEY_LENGTH);
}