Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use xbt_XXX_is_empty() instead of testing xbt_XXX_length() against 0.
[simgrid.git] / src / bindings / lua / lua_console.c
index c96a02e..82b7f6b 100644 (file)
@@ -226,7 +226,7 @@ int console_add_route(lua_State *L) {
   lua_pushstring(L,"links");
   lua_gettable(L,-2);
   links = xbt_str_split(lua_tostring(L, -1), ", \t\r\n");
-  if (xbt_dynar_length(links)==0)
+  if (xbt_dynar_is_empty(links))
     xbt_dynar_push_as(links,char*,xbt_strdup(lua_tostring(L, -1)));
   lua_pop(L,1);