git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a430a52
)
Fix two off-by-1 errors in hist_to_string().
author
Zdeněk Salvet
<salvet@ics.muni.cz>
Mon, 14 May 2007 09:38:59 +0000
(09:38 +0000)
committer
Zdeněk Salvet
<salvet@ics.muni.cz>
Mon, 14 May 2007 09:38:59 +0000
(09:38 +0000)
org.glite.lb.server/src/jobstat.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.server/src/jobstat.c
b/org.glite.lb.server/src/jobstat.c
index
49f4c93
..
d13aada
100644
(file)
--- a/
org.glite.lb.server/src/jobstat.c
+++ b/
org.glite.lb.server/src/jobstat.c
@@
-714,10
+714,10
@@
static char* hist_to_string(int * hist)
assert(hist[0] == EDG_WLL_NUMBER_OF_STATCODES);
- asprintf(&s, "%s=%d", edg_wll_StatToString(1), hist[
1
]);
+ asprintf(&s, "%s=%d", edg_wll_StatToString(1), hist[
2
]);
- for (i=
1
; i<hist[0] ; i++) {
- asprintf(&s1, "%s, %s=%d", s, edg_wll_StatToString(i), hist[i]);
+ for (i=
2
; i<hist[0] ; i++) {
+ asprintf(&s1, "%s, %s=%d", s, edg_wll_StatToString(i), hist[i
+1
]);
free(s); s=s1; s1=NULL;
}