Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix to handle warnings+optimizations on CI [#15544]
[simgrid.git] / src / bindings / java / smx_context_cojava.c
index 5e135f2..6ecaca1 100644 (file)
@@ -264,7 +264,8 @@ static void smx_ctx_cojava_create_coroutine(smx_ctx_cojava_t context) {
      FILE *conf= fopen("/proc/sys/vm/max_map_count","r");
      if (conf) {
        int limit=-1;
-       fscanf(conf,"%d",&limit);
+        if(!fscanf(conf,"%d",&limit))
+           xbt_die("Error while creating a new coroutine. Parse error.");
        fclose(conf);
        if (limit!=-1 && SIMIX_process_count() > (limit - 100) /2)
           xbt_die("Error while creating a new coroutine. "