Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / examples / c / dht-kademlia / node.c
index d8204d3..f118c64 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -156,7 +156,7 @@ void routing_table_update(const_node_t node, unsigned int id)
   // check if the id is already in the bucket.
   unsigned int id_pos = bucket_find_id(bucket, id);
 
-  if (id_pos == -1) {
+  if (id_pos == (unsigned int)-1) {
     /* We check if the bucket is full or not. If it is, we evict an old element */
     if (xbt_dynar_length(bucket->nodes) >= BUCKET_SIZE)
       xbt_dynar_pop(bucket->nodes, NULL);