summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-03-14 03:49:28 +0000
committeriphydf <iphydf@users.noreply.github.com>2020-03-14 13:48:56 +0000
commit8795c5f987e2bd716d59a96418f1c7f6f9e83839 (patch)
treee3650c76847df0871e853964a9c54c16757b2205 /toxav/toxav.c
parent94d98ddd863279d5bf811d0107d73c373380dda2 (diff)
Avoid casting back and forth between void-ptr.
In windows network code, we implement inet_pton and inet_ntop, which take void pointers. We can do slightly better because we already know the type when we call these functions, so we can avoid casting between void pointer and the addr struct types.
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index ba27fe27..597d7bea 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -131,7 +131,9 @@ ToxAV *toxav_new(Tox *tox, Toxav_Err_New *error)
131 131
132 // TODO(iphydf): Don't rely on toxcore internals. 132 // TODO(iphydf): Don't rely on toxcore internals.
133 Messenger *m; 133 Messenger *m;
134 //!TOKSTYLE-
134 m = *(Messenger **)tox; 135 m = *(Messenger **)tox;
136 //!TOKSTYLE+
135 137
136 if (m->msi_packet) { 138 if (m->msi_packet) {
137 rc = TOXAV_ERR_NEW_MULTIPLE; 139 rc = TOXAV_ERR_NEW_MULTIPLE;