diff options
| author | George Hazan <ghazan@miranda.im> | 2020-03-26 20:45:32 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2020-03-26 20:45:32 +0300 |
| commit | 57bf1c3a69d5b52f0f61172ddff50f24dbe8351e (patch) | |
| tree | 9702e1a3e848bffb1ff4d71bbf9096b00d9c3596 /protocols/Tox/libtox/src/toxcore/util.c | |
| parent | c89b7af83f86699b0f7b2564d8c301c9f60aaf4e (diff) | |
fixes #2286 (Update libtox to 0.2.11)
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/util.c')
| -rw-r--r-- | protocols/Tox/libtox/src/toxcore/util.c | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/util.c b/protocols/Tox/libtox/src/toxcore/util.c index 73e16c4585..58b75763e5 100644 --- a/protocols/Tox/libtox/src/toxcore/util.c +++ b/protocols/Tox/libtox/src/toxcore/util.c @@ -1,27 +1,11 @@ -/* - * Utilities. - */ - -/* +/* SPDX-License-Identifier: GPL-3.0-or-later * Copyright © 2016-2018 The TokTok team. * Copyright © 2013 Tox project. * Copyright © 2013 plutooo - * - * This file is part of Tox, the free peer to peer instant messenger. - * This file is donated to the Tox Project. - * - * Tox is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Tox is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Tox. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Utilities. */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,25 +36,6 @@ uint32_t id_copy(uint8_t *dest, const uint8_t *src) return CRYPTO_PUBLIC_KEY_SIZE; } -void host_to_net(uint8_t *num, uint16_t numbytes) -{ -#ifndef WORDS_BIGENDIAN - uint32_t i; - VLA(uint8_t, buff, numbytes); - - for (i = 0; i < numbytes; ++i) { - buff[i] = num[numbytes - i - 1]; - } - - memcpy(num, buff, numbytes); -#endif -} - -void net_to_host(uint8_t *num, uint16_t numbytes) -{ - host_to_net(num, numbytes); -} - int create_recursive_mutex(pthread_mutex_t *mutex) { pthread_mutexattr_t attr; |
