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 cadet/gnunet-service-cadet_paths.c
- * @brief Information we track per path.
+ * @brief Information we track per path.
* @author Bartlomiej Polot
* @author Christian Grothoff
*/
(off + 1 != cm_ctx->cpath_length) )
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "check_match missmatch because path %s is too long (%u vs. %u vs. %u)\n",
+ "check_match mismatch because path %s is too long (%u vs. %u vs. %u)\n",
GCPP_2s (path),
path->entries_length,
off + 1,
i))
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "check_match path %s missmatches at offset %u\n",
+ "check_match path %s mismatches at offset %u\n",
GCPP_2s (path),
i);
- return GNUNET_YES; /* missmatch, ignore */
+ return GNUNET_YES; /* mismatch, ignore */
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
"check_match found match with path %s\n",
struct CadetPeer *cpath[get_path_length + put_path_length];
struct CheckMatchContext cm_ctx;
struct CadetPeerPath *path;
- int i;
unsigned int skip;
unsigned int total_len;
? &get_path[get_path_length - off - 1]
: &put_path[get_path_length + put_path_length - off - 1];
/* Check that I am not in the path */
- if (0 == memcmp (&my_full_id,
- pid,
- sizeof (struct GNUNET_PeerIdentity)))
+ if (0 == GNUNET_memcmp (&my_full_id,
+ pid))
{
skip = off + 1;
continue;
cm_ctx.cpath_length = total_len;
cm_ctx.cpath = cpath;
cm_ctx.match = NULL;
- for (i=total_len-1;i>=0;i--)
+ for (int i=total_len-1;i>=0;i--)
{
GCP_iterate_paths_at (cpath[i],
(unsigned int) i,
path->entries_length = total_len;
path->entries = GNUNET_new_array (path->entries_length,
struct CadetPeerPathEntry *);
- for (i=path->entries_length-1;i>=0;i--)
+ for (int i=path->entries_length-1;i>=0;i--)
{
struct CadetPeerPathEntry *entry = GNUNET_new (struct CadetPeerPathEntry);
entry->peer = cpath[i];
entry->path = path;
}
- for (i=path->entries_length-1;i>=0;i--)
+ for (int i=path->entries_length-1;i>=0;i--)
{
struct CadetPeerPathEntry *entry = path->entries[i];