diff options
Diffstat (limited to 'tools/src/h5repack/h5repack_opttable.c')
-rw-r--r-- | tools/src/h5repack/h5repack_opttable.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c index 0239f6c..56fc12d 100644 --- a/tools/src/h5repack/h5repack_opttable.c +++ b/tools/src/h5repack/h5repack_opttable.c @@ -52,11 +52,10 @@ void init_packobject(pack_info_t *obj) static void aux_tblinsert_filter(pack_opttbl_t *table, unsigned int I, filter_info_t filt) { - H5TOOLS_ERR_INIT(int, 0) if (table->objs[I].nfilters < H5_REPACK_MAX_NFILTERS) table->objs[I].filter[table->objs[I].nfilters++] = filt; else - H5TOOLS_INFO(H5E_tools_min_id_g, "cannot insert the filter in this object. Maximum capacity exceeded"); + H5TOOLS_INFO("cannot insert the filter in this object. Maximum capacity exceeded"); } /*------------------------------------------------------------------------- @@ -100,13 +99,13 @@ static void aux_tblinsert_layout(pack_opttbl_t *table, unsigned int I, pack_info static int aux_inctable(pack_opttbl_t *table, unsigned n_objs) { - H5TOOLS_ERR_INIT(int, 0) unsigned u; + int ret_value = 0; table->size += n_objs; table->objs = (pack_info_t*) HDrealloc(table->objs, table->size * sizeof(pack_info_t)); if (table->objs == NULL) { - H5TOOLS_INFO(H5E_tools_min_id_g, "not enough memory for options table"); + H5TOOLS_INFO("not enough memory for options table"); ret_value = -1; } else { @@ -127,19 +126,19 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs) *------------------------------------------------------------------------- */ int options_table_init(pack_opttbl_t **tbl) { - H5TOOLS_ERR_INIT(int, 0) unsigned int i; pack_opttbl_t *table; + int ret_value = 0; if (NULL == (table = (pack_opttbl_t *) HDmalloc(sizeof(pack_opttbl_t)))) { - H5TOOLS_GOTO_ERROR(-1, H5E_tools_min_id_g, "not enough memory for options table"); + H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table"); } table->size = 30; table->nelems = 0; if (NULL == (table->objs = (pack_info_t*) HDmalloc(table->size * sizeof(pack_info_t)))) { HDfree(table); - H5TOOLS_GOTO_ERROR(-1, H5E_tools_min_id_g, "not enough memory for options table"); + H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table"); } for (i = 0; i < table->size; i++) @@ -177,10 +176,10 @@ int options_table_free(pack_opttbl_t *table) { int options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pack_opttbl_t *table) { - H5TOOLS_ERR_INIT(herr_t, 0) unsigned i, j, I; unsigned added = 0; hbool_t found = FALSE; + int ret_value = 0; /* increase the size of the collection by N_OBJS if necessary */ if (table->nelems + n_objs >= table->size) @@ -197,7 +196,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pa if (HDstrcmp(obj_list[j].obj,table->objs[i].path) == 0) { /* already chunk info inserted for this one; exit */ if (table->objs[i].chunk.rank > 0) { - H5TOOLS_INFO(H5E_tools_min_info_id_g, "chunk information already inserted for <%s>\n", obj_list[j].obj); + H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj); HDexit(EXIT_FAILURE); } /* insert the layout info */ |