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
don't break if debug is activated ...
[simgrid.git]
/
src
/
simdag
/
sd_dotloader.c
diff --git
a/src/simdag/sd_dotloader.c
b/src/simdag/sd_dotloader.c
index 6bb01be200dbc516438381aac9e7d518ab199387..c2c58a4a1a0e492eb563a1eb109d245aca94ce33 100644
(file)
--- a/
src/simdag/sd_dotloader.c
+++ b/
src/simdag/sd_dotloader.c
@@
-215,13
+215,15
@@
xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par){
/* try to take the information to schedule the task only if all is
* right*/
int performer, order;
/* try to take the information to schedule the task only if all is
* right*/
int performer, order;
- char *char_performer
, *char_order
;
+ char *char_performer
= NULL, *char_order=NULL
;
/* performer is the computer which execute the task */
performer =
/* performer is the computer which execute the task */
performer =
- (!strcmp((char_performer = agget(node, (char *) "performer")), "")?
- -1:atoi(char_performer));
+ ((!char_performer ||
+ !strcmp((char_performer = agget(node, (char *) "performer")),
+ "")) ? -1:atoi(char_performer));
/* order is giving the task order on one computer */
/* order is giving the task order on one computer */
- order = (!strcmp((char_order = agget(node, (char *) "order")), "")?
+ order = ((!char_order ||
+ !strcmp((char_order = agget(node, (char *) "order")), ""))?
-1:atoi(char_order));
XBT_DEBUG ("Task '%s' is scheduled on workstation '%d' in position '%d'",
-1:atoi(char_order));
XBT_DEBUG ("Task '%s' is scheduled on workstation '%d' in position '%d'",