diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmulti.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index acd128c..800869d 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1966,30 +1966,30 @@ compute_next(H5FD_multi_t *file) static int open_members(H5FD_multi_t *file) { - char tmp[H5FD_MULT_MAX_FILE_NAME_LEN]; - int nerrors=0; + char tmp[H5FD_MULT_MAX_FILE_NAME_LEN]; + int nerrors = 0; static const char *func="(H5FD_multi)open_members"; /* Function Name for error reporting */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); UNIQUE_MEMBERS(file->fa.memb_map, mt) { - if(file->memb[mt]) + if(file->memb[mt]) continue; /*already open*/ - assert(file->fa.memb_name[mt]); + assert(file->fa.memb_name[mt]); /* Note: This truncates the user's filename down to only sizeof(tmp) * characters. -QK & JK, 2013/01/17 */ - snprintf(tmp, sizeof(tmp), file->fa.memb_name[mt], file->name); + sprintf(tmp, file->fa.memb_name[mt], file->name); tmp[sizeof(tmp) - 1] = '\0'; - H5E_BEGIN_TRY { - file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF); - } H5E_END_TRY; - if(!file->memb[mt]) { - if(!file->fa.relax || (file->flags & H5F_ACC_RDWR)) - nerrors++; - } + H5E_BEGIN_TRY { + file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF); + } H5E_END_TRY; + if(!file->memb[mt]) { + if(!file->fa.relax || (file->flags & H5F_ACC_RDWR)) + nerrors++; + } } END_MEMBERS; if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1) |