-/* 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. */
// 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);