summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FDmulti.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index bc61374..b53b9bf 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -48,12 +48,12 @@
H5FD_mem_t _unmapped, LOOPVAR; \
hbool_t _seen[H5FD_MEM_NTYPES]; \
\
- memset(_seen, 0, sizeof _seen); \
+ memset(_seen, 0, H5FD_MEM_NTYPES * sizeof(hbool_t)); \
for (_unmapped=H5FD_MEM_SUPER; _unmapped<H5FD_MEM_NTYPES; _unmapped=(H5FD_mem_t)(_unmapped+1)) { \
LOOPVAR = MAP[_unmapped]; \
if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \
assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
- if (_seen[LOOPVAR]++) continue;
+ if (_seen[LOOPVAR]) continue; else _seen[LOOPVAR] = TRUE; \
#define ALL_MEMBERS(LOOPVAR) { \
H5FD_mem_t LOOPVAR; \