A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make visible the MSG_task_get variant accepting both an host and a timeout
[simgrid.git]
/
src
/
xbt
/
set.c
diff --git
a/src/xbt/set.c
b/src/xbt/set.c
index 609ecd6318490fab529e8bdaf2094c811bdc549d..25c836472376069585a688d6c930ebb1512c4be0 100644
(file)
--- a/
src/xbt/set.c
+++ b/
src/xbt/set.c
@@
-230,7
+230,7
@@
unsigned long xbt_set_length (const xbt_set_t set) {
***/
typedef struct xbt_set_cursor_ {
xbt_set_t set;
***/
typedef struct xbt_set_cursor_ {
xbt_set_t set;
- int val;
+
unsigned
int val;
} s_xbt_set_cursor_t;
/** @brief Create the cursor if it does not exists, rewind it in any case. */
} s_xbt_set_cursor_t;
/** @brief Create the cursor if it does not exists, rewind it in any case. */
@@
-265,7
+265,7
@@
void xbt_set_cursor_step (xbt_set_cursor_t cursor) {
do {
cursor->val++;
}
do {
cursor->val++;
}
- while (cursor->val <
(int)
xbt_dynar_length(dynar) &&
+ while (cursor->val < xbt_dynar_length(dynar) &&
xbt_dynar_get_ptr(dynar, cursor->val) == NULL);
}
xbt_dynar_get_ptr(dynar, cursor->val) == NULL);
}
@@
-282,7
+282,7
@@
int xbt_set_cursor_get_or_free (xbt_set_cursor_t *curs,
cursor=*curs;
cursor=*curs;
- if (cursor->val >=
(int)
xbt_dynar_length(cursor->set->dynar)) {
+ if (cursor->val >= xbt_dynar_length(cursor->set->dynar)) {
free(cursor);
*curs=NULL;
return FALSE;
free(cursor);
*curs=NULL;
return FALSE;