X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/526580da10516c95a43d4c08a55f8d525c7a611e..453434d0a99cf069777049230d135478dbfe848c:/include/xbt/dynar.h diff --git a/include/xbt/dynar.h b/include/xbt/dynar.h index fee93eb359..52a99e05b9 100644 --- a/include/xbt/dynar.h +++ b/include/xbt/dynar.h @@ -208,17 +208,17 @@ typedef struct xbt_dynar_s { static inline int _xbt_dynar_cursor_get(const xbt_dynar_t dynar, unsigned int idx, void* const dst) { if (!dynar) /* iterating over a NULL dynar is a no-op */ - return false; + return 0; if (idx >= dynar->used) { //XBT_DEBUG("Cursor on %p already on last elem", (void *) dynar); - return false; + return 0; } // XBT_DEBUG("Cash out cursor on %p at %u", (void *) dynar, *idx); memcpy(dst, ((char *) dynar->data) + idx * dynar->elmsize, dynar->elmsize); - return true; + return 1; } /** @brief Iterates over the whole dynar.