summaryrefslogtreecommitdiff
path: root/toxencryptsave
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-05 10:31:29 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-05 23:09:28 +0000
commit8739f7fccb7cafc54ca0f5fa074c9a740f7048ba (patch)
tree88e9f53fa6e734cd8095487d1896c56f844c782c /toxencryptsave
parent64d0297acc7d6a1697683052e15cc76383312c38 (diff)
Make tox.c unambiguously parseable.
Rules: 1. Constants are uppercase names: THE_CONSTANT. 2. SUE[1] types start with an uppercase letter and have at least one lowercase letter in it: The_Type, THE_Type. 3. Function types end in "_cb": tox_friend_connection_cb. 4. Variable and function names are all lowercase: the_function. This makes it easier for humans reading the code to determine what an identifier means. I'm not convinced by the enum type name change, but I don't know a better rule. Currently, a lot of enum types are spelled like constants, which is confusing. [1] struct/union/enum
Diffstat (limited to 'toxencryptsave')
-rw-r--r--toxencryptsave/toxencryptsave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c
index 4f827c9e..7c81f722 100644
--- a/toxencryptsave/toxencryptsave.c
+++ b/toxencryptsave/toxencryptsave.c
@@ -29,7 +29,7 @@
29#include "../toxcore/crypto_core.h" 29#include "../toxcore/crypto_core.h"
30#include "defines.h" 30#include "defines.h"
31#include "toxencryptsave.h" 31#include "toxencryptsave.h"
32#define SET_ERROR_PARAMETER(param, x) {if(param) {*param = x;}} 32#define SET_ERROR_PARAMETER(param, x) do { if (param) { *param = x; } } while (0)
33 33
34#ifdef VANILLA_NACL 34#ifdef VANILLA_NACL
35#include <crypto_box.h> 35#include <crypto_box.h>