diff options
author | iphydf <iphydf@users.noreply.github.com> | 2020-03-18 00:42:23 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2020-03-18 00:53:02 +0000 |
commit | 1b7bf5b18299e65285c66bb498d181c2ccc2813e (patch) | |
tree | a88c912d0be1a545b58145cb55717dcd2de4c336 /toxav/msi.c | |
parent | 983c2c44fe42bfaa3e62961cfbbf1c9ea504c7bb (diff) |
Mark file-local function definitions as `static`.
https://github.com/TokTok/hs-tokstyle/pull/43 implements a validation for
this. We should avoid locally declaring functions from another
translation unit, and instead use header files to export/import them.
Diffstat (limited to 'toxav/msi.c')
-rw-r--r-- | toxav/msi.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/toxav/msi.c b/toxav/msi.c index 69046079..aad2bb2d 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -61,20 +61,21 @@ typedef struct MSIMessage { | |||
61 | } MSIMessage; | 61 | } MSIMessage; |
62 | 62 | ||
63 | 63 | ||
64 | void msg_init(MSIMessage *dest, MSIRequest request); | 64 | static void msg_init(MSIMessage *dest, MSIRequest request); |
65 | int msg_parse_in(const Logger *log, MSIMessage *dest, const uint8_t *data, uint16_t length); | 65 | static int msg_parse_in(const Logger *log, MSIMessage *dest, const uint8_t *data, uint16_t length); |
66 | uint8_t *msg_parse_header_out(MSIHeaderID id, uint8_t *dest, const void *value, uint8_t value_len, uint16_t *length); | 66 | static uint8_t *msg_parse_header_out(MSIHeaderID id, uint8_t *dest, const void *value, uint8_t value_len, |
67 | uint16_t *length); | ||
67 | static int send_message(Messenger *m, uint32_t friend_number, const MSIMessage *msg); | 68 | static int send_message(Messenger *m, uint32_t friend_number, const MSIMessage *msg); |
68 | int send_error(Messenger *m, uint32_t friend_number, MSIError error); | 69 | static int send_error(Messenger *m, uint32_t friend_number, MSIError error); |
69 | static int invoke_callback(MSICall *call, MSICallbackID cb); | 70 | static int invoke_callback(MSICall *call, MSICallbackID cb); |
70 | static MSICall *get_call(MSISession *session, uint32_t friend_number); | 71 | static MSICall *get_call(MSISession *session, uint32_t friend_number); |
71 | MSICall *new_call(MSISession *session, uint32_t friend_number); | 72 | static MSICall *new_call(MSISession *session, uint32_t friend_number); |
72 | void kill_call(MSICall *call); | 73 | static void kill_call(MSICall *call); |
73 | void on_peer_status(Messenger *m, uint32_t friend_number, uint8_t status, void *data); | 74 | static void on_peer_status(Messenger *m, uint32_t friend_number, uint8_t status, void *data); |
74 | void handle_init(MSICall *call, const MSIMessage *msg); | 75 | static void handle_init(MSICall *call, const MSIMessage *msg); |
75 | void handle_push(MSICall *call, const MSIMessage *msg); | 76 | static void handle_push(MSICall *call, const MSIMessage *msg); |
76 | void handle_pop(MSICall *call, const MSIMessage *msg); | 77 | static void handle_pop(MSICall *call, const MSIMessage *msg); |
77 | void handle_msi_packet(Messenger *m, uint32_t friend_number, const uint8_t *data, uint16_t length, void *object); | 78 | static void handle_msi_packet(Messenger *m, uint32_t friend_number, const uint8_t *data, uint16_t length, void *object); |
78 | 79 | ||
79 | 80 | ||
80 | /** | 81 | /** |