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
tesh: do not fail on empty output, when sorting is enabled.
[simgrid.git]
/
tools
/
tesh
/
run_context.c
diff --git
a/tools/tesh/run_context.c
b/tools/tesh/run_context.c
index
fa0c8ac
..
f734a41
100644
(file)
--- a/
tools/tesh/run_context.c
+++ b/
tools/tesh/run_context.c
@@
-727,7
+727,7
@@
void *rctx_wait(void *r)
if (rctx->output_sort) {
xbt_dynar_sort(b, cmpstringp);
/* If empty lines moved in first position, remove them */
if (rctx->output_sort) {
xbt_dynar_sort(b, cmpstringp);
/* If empty lines moved in first position, remove them */
- while (
*xbt_dynar_getfirst_as(b, char
*) == '\0')
+ while (
!xbt_dynar_is_empty(b) && *xbt_dynar_getfirst_as(b, char
*) == '\0')
xbt_dynar_shift(b, NULL);
}
xbt_dynar_shift(b, NULL);
}