diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-31 19:12:19 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-31 20:04:16 +0100 |
commit | 633da98ae69866efb195e00d9a3a22ace6bada66 (patch) | |
tree | 875535f3d2257c4ea5bb97a553b2f1beab4a1590 /toxcore/tox.c | |
parent | 6356eb4e4fe407fa7870f2a685d0d08b5c2ec5bb (diff) |
Add braces to all if statements.
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index a98e8aa7..960fb618 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -251,8 +251,9 @@ Tox *tox_new(const struct Tox_Options *options, TOX_ERR_NEW *error) | |||
251 | 251 | ||
252 | ip_init(&m_options.proxy_info.ip_port.ip, m_options.ipv6enabled); | 252 | ip_init(&m_options.proxy_info.ip_port.ip, m_options.ipv6enabled); |
253 | 253 | ||
254 | if (m_options.ipv6enabled) | 254 | if (m_options.ipv6enabled) { |
255 | m_options.proxy_info.ip_port.ip.family = AF_UNSPEC; | 255 | m_options.proxy_info.ip_port.ip.family = AF_UNSPEC; |
256 | } | ||
256 | 257 | ||
257 | if (!addr_resolve_or_parse_ip(options->proxy_host, &m_options.proxy_info.ip_port.ip, NULL)) { | 258 | if (!addr_resolve_or_parse_ip(options->proxy_host, &m_options.proxy_info.ip_port.ip, NULL)) { |
258 | SET_ERROR_PARAMETER(error, TOX_ERR_NEW_PROXY_BAD_HOST); | 259 | SET_ERROR_PARAMETER(error, TOX_ERR_NEW_PROXY_BAD_HOST); |
@@ -499,16 +500,18 @@ void tox_self_get_public_key(const Tox *tox, uint8_t *public_key) | |||
499 | { | 500 | { |
500 | const Messenger *m = tox; | 501 | const Messenger *m = tox; |
501 | 502 | ||
502 | if (public_key) | 503 | if (public_key) { |
503 | memcpy(public_key, m->net_crypto->self_public_key, crypto_box_PUBLICKEYBYTES); | 504 | memcpy(public_key, m->net_crypto->self_public_key, crypto_box_PUBLICKEYBYTES); |
505 | } | ||
504 | } | 506 | } |
505 | 507 | ||
506 | void tox_self_get_secret_key(const Tox *tox, uint8_t *secret_key) | 508 | void tox_self_get_secret_key(const Tox *tox, uint8_t *secret_key) |
507 | { | 509 | { |
508 | const Messenger *m = tox; | 510 | const Messenger *m = tox; |
509 | 511 | ||
510 | if (secret_key) | 512 | if (secret_key) { |
511 | memcpy(secret_key, m->net_crypto->self_secret_key, crypto_box_SECRETKEYBYTES); | 513 | memcpy(secret_key, m->net_crypto->self_secret_key, crypto_box_SECRETKEYBYTES); |
514 | } | ||
512 | } | 515 | } |
513 | 516 | ||
514 | bool tox_self_set_name(Tox *tox, const uint8_t *name, size_t length, TOX_ERR_SET_INFO *error) | 517 | bool tox_self_set_name(Tox *tox, const uint8_t *name, size_t length, TOX_ERR_SET_INFO *error) |