From 8739f7fccb7cafc54ca0f5fa074c9a740f7048ba Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 5 Jul 2018 10:31:29 +0000 Subject: 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 --- toxcore/LAN_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toxcore/LAN_discovery.c') diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index d25aace3..9552ad05 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -371,7 +371,7 @@ static int handle_LANdiscovery(void *object, IP_Port source, const uint8_t *pack return 1; } - DHT_bootstrap(dht, source, packet + 1); + dht_bootstrap(dht, source, packet + 1); return 0; } -- cgit v1.2.3