Copyright (C) 2010, 2011, 2016 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published
+ under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
* @file ats/ats_api_performance.c
amount = ntohl (rr->amount);
rc = ph->reservation_head;
- if (0 != memcmp (&rr->peer,
- &rc->peer,
- sizeof(struct GNUNET_PeerIdentity)))
+ if (0 != GNUNET_memcmp (&rr->peer,
+ &rc->peer))
{
GNUNET_break(0);
reconnect (ph);
return; /* was canceled */
memset (&allzeros, '\0', sizeof (allzeros));
- if ( (0 == memcmp (&allzeros, &pi->peer, sizeof(allzeros))) &&
+ if ( (0 == GNUNET_is_zero (&pi->peer)) &&
(0 == plugin_name_length) &&
(0 == plugin_address_length) )
{
count = 0;
va_start(ap, peer);
while (GNUNET_ATS_PREFERENCE_END !=
- (kind = va_arg (ap, enum GNUNET_ATS_PreferenceKind) ))
+ (kind = GNUNET_VA_ARG_ENUM (ap, GNUNET_ATS_PreferenceKind) ))
{
switch (kind)
{
count = 0;
va_start(ap, peer);
while (GNUNET_ATS_PREFERENCE_END != (kind =
- va_arg (ap, enum GNUNET_ATS_PreferenceKind) ))
+ GNUNET_VA_ARG_ENUM (ap, GNUNET_ATS_PreferenceKind) ))
{
pi[count].preference_kind = htonl (kind);
switch (kind)
count = 0;
va_start(ap, scope);
while (GNUNET_ATS_PREFERENCE_END !=
- (kind = va_arg (ap, enum GNUNET_ATS_PreferenceKind) ))
+ (kind = GNUNET_VA_ARG_ENUM (ap, GNUNET_ATS_PreferenceKind) ))
{
switch (kind)
{
count = 0;
va_start(ap, scope);
while (GNUNET_ATS_PREFERENCE_END != (kind =
- va_arg (ap, enum GNUNET_ATS_PreferenceKind) ))
+ GNUNET_VA_ARG_ENUM (ap, GNUNET_ATS_PreferenceKind) ))
{
pi[count].preference_kind = htonl (kind);
switch (kind)