/*
* Copyright (c) 2020 Doc.ai and/or its affiliates.
+ * Copyright (c) 2020 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
/* *INDENT-OFF* */
- pool_foreach (peer, wg_peer_pool,
- ({
+ pool_foreach (peer, wg_peer_pool)
+ {
if (!memcmp (peer->remote.r_public, public_key, NOISE_PUBLIC_KEY_LEN))
{
return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
}
- }));
+ }
/* *INDENT-ON* */
if (pool_elts (wg_peer_pool) > MAX_PEERS)
index_t peeri;
/* *INDENT-OFF* */
- pool_foreach_index(peeri, wg_peer_pool,
+ pool_foreach_index (peeri, wg_peer_pool)
{
if (WALK_STOP == fn(peeri, data))
return peeri;
- });
+ }
/* *INDENT-ON* */
return INDEX_INVALID;
}