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
Fix to handle warnings+optimizations on CI [#15544]
[simgrid.git]
/
src
/
bindings
/
java
/
smx_context_cojava.c
diff --git
a/src/bindings/java/smx_context_cojava.c
b/src/bindings/java/smx_context_cojava.c
index
4d5dd53
..
6ecaca1
100644
(file)
--- a/
src/bindings/java/smx_context_cojava.c
+++ b/
src/bindings/java/smx_context_cojava.c
@@
-247,7
+247,7
@@
static void smx_ctx_cojava_runall(void)
{
cojava_processes = SIMIX_process_get_runnable();
smx_process_t process;
- if (
xbt_dynar_length(cojava_processes) > 0
) {
+ if (
!xbt_dynar_is_empty(cojava_processes)
) {
process = xbt_dynar_get_as(cojava_processes, 0, smx_process_t);
cojava_process_index = 1;
/* Execute the first process */
@@
-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. "