summaryrefslogtreecommitdiff
path: root/toxcore/onion.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-08 14:55:26 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-08 18:23:45 +0000
commitebdc43285a4fdf1f9d76f8839a9ba572a35cbb80 (patch)
tree780093381841fcccbed8138d5a8fe1cc99923c03 /toxcore/onion.c
parent819fe534ea62b07340b20f18841d1ed93cf5caff (diff)
Use named types for onion callbacks.
This is now a style rule: you can only use typedef'd function types. Previous rules now applied in `onion_*.c`: * `struct`s must have a name (typedef of unnamed struct is not allowed). * `++i` for increment-stmt, not `i++`, e.g. in loops. * Only a single declarator per struct member declaration. * Type_Names vs. variable_names.
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r--toxcore/onion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c
index 5bbc7f75..cfe12a05 100644
--- a/toxcore/onion.c
+++ b/toxcore/onion.c
@@ -655,7 +655,7 @@ static int handle_recv_1(void *object, IP_Port source, const uint8_t *packet, ui
655 return 0; 655 return 0;
656} 656}
657 657
658void set_callback_handle_recv_1(Onion *onion, int (*function)(void *, IP_Port, const uint8_t *, uint16_t), void *object) 658void set_callback_handle_recv_1(Onion *onion, onion_recv_1_cb *function, void *object)
659{ 659{
660 onion->recv_1_function = function; 660 onion->recv_1_function = function;
661 onion->callback_object = object; 661 onion->callback_object = object;