1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-08-25 06:31:43 +02:00

fix error handling in read_group_dset

This commit is contained in:
q-posev 2021-06-03 17:32:50 +02:00
parent c160de1a1b
commit 52e636f610

View File

@ -1454,6 +1454,7 @@ trexio_read_$group_dset$ (trexio_t* const file, char* const dset, const uint32_t
assert(file->back_end < TREXIO_INVALID_BACK_END); assert(file->back_end < TREXIO_INVALID_BACK_END);
rc = TREXIO_FAILURE;
switch (file->back_end) { switch (file->back_end) {
case TREXIO_TEXT: case TREXIO_TEXT:
@ -1470,7 +1471,7 @@ trexio_read_$group_dset$ (trexio_t* const file, char* const dset, const uint32_t
,*/ ,*/
} }
return TREXIO_SUCCESS; return rc;
} }
#+end_src #+end_src
@ -1531,7 +1532,8 @@ trexio_write_$group_dset$ (trexio_t* const file, const char* dset, const uint32_
strncpy(tmp_str, pch, max_str_len); strncpy(tmp_str, pch, max_str_len);
tmp_str += max_str_len + 1; tmp_str += max_str_len + 1;
} }
rc = TREXIO_FAILURE;
switch (file->back_end) { switch (file->back_end) {
case TREXIO_TEXT: case TREXIO_TEXT: