[svn-r7297] Purpose:

Code cleanup

Description:
    Changed lines like:
        H5E_clear(H5E_get_my_stack());

    to:
        H5E_clear(NULL);

    which performs the same operation.

Platforms tested:
    h5committested
This commit is contained in:
Quincey Koziol 2003-08-08 13:47:43 -05:00
parent 9038dcb4b6
commit 1186c0b7fa
11 changed files with 33 additions and 33 deletions

View File

@ -276,7 +276,7 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type,
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't release attribute info")
seq++;
}
H5E_clear(H5E_get_my_stack()); \
H5E_clear(NULL);
/* Create the attribute message and save the attribute index */
if (H5O_modify(&(attr->ent), H5O_ATTR_ID, H5O_NEW_MESG, 0, 1, attr, dxpl_id) < 0)
@ -348,7 +348,7 @@ H5A_get_index(H5G_entry_t *ent, const char *name, hid_t dxpl_id)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't release attribute info")
i++;
}
H5E_clear(H5E_get_my_stack()); \
H5E_clear(NULL);
if(ret_value<0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "attribute not found")
@ -1326,7 +1326,7 @@ H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op, void *op_data)
if(H5O_reset (H5O_ATTR_ID, &found_attr)<0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't release attribute info")
}
H5E_clear(H5E_get_my_stack()); \
H5E_clear(NULL);
}
else
if(start_idx>0)
@ -1401,7 +1401,7 @@ H5Adelete(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't release attribute info")
idx++;
}
H5E_clear(H5E_get_my_stack()); \
H5E_clear(NULL);
if (found<0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "attribute not found")

View File

@ -311,7 +311,7 @@ H5AC_term_interface(void)
if (H5Pclose(H5AC_dxpl_id) < 0 ||
H5Pclose(H5AC_noblock_dxpl_id) < 0 ||
H5Pclose(H5AC_ind_dxpl_id) < 0)
H5E_clear(H5E_get_my_stack()); /*ingnore error*/ \
H5E_clear(NULL); /*ignore error*/
else {
/* Reset static IDs */
H5AC_dxpl_id=(-1);

View File

@ -1950,7 +1950,7 @@ H5D_open(H5G_entry_t *ent, hid_t dxpl_id)
H5D_t *dataset; /*the dataset which was found */
/* Clear any errors from H5FO_opened() */
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
/* Open the dataset object */
if ((dataset=H5D_open_oid(ent, dxpl_id)) ==NULL)
@ -2054,7 +2054,7 @@ H5D_open_oid(const H5G_entry_t *ent, hid_t dxpl_id)
/* Get the optional filters message */
if(NULL == H5O_read(&(dataset->ent), H5O_PLINE_ID, 0, &pline, dxpl_id)) {
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
HDmemset(&pline, 0, sizeof(pline));
}
if(H5P_set(plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
@ -2120,7 +2120,7 @@ H5D_open_oid(const H5G_entry_t *ent, hid_t dxpl_id)
/* Get the new fill value message */
if(NULL == H5O_read(&(dataset->ent), H5O_FILL_NEW_ID, 0, &fill, dxpl_id)) {
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
HDmemset(&fill, 0, sizeof(fill));
/* Set the space allocation time appropriately, based on the type of dataset storage */
@ -2151,7 +2151,7 @@ H5D_open_oid(const H5G_entry_t *ent, hid_t dxpl_id)
/* For compatibility with v1.4. Retrieve the old fill value message.
* If size is 0, make it -1 for undefined. */
if(NULL == H5O_read(&(dataset->ent), H5O_FILL_ID, 0, fill_prop, dxpl_id)) {
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
HDmemset(fill_prop, 0, sizeof(H5O_fill_t));
}
if(fill_prop->size == 0) {

View File

@ -1432,7 +1432,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
udata.mesg = *layout;
udata.addr = HADDR_UNDEF;
status = H5B_find (f, dxpl_id, H5B_ISTORE, layout->addr, &udata);
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
if (status>=0 && H5F_addr_defined(udata.addr)) {
size_t chunk_alloc=0; /*allocated chunk size */
@ -2082,7 +2082,7 @@ H5F_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
/* Go get the chunk information */
if (H5B_find (f, dxpl_id, H5B_ISTORE, layout->addr, &udata)<0) {
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
HGOTO_ERROR(H5E_BTREE,H5E_NOTFOUND,HADDR_UNDEF,"Can't locate chunk info");
} /* end if */

View File

@ -1432,7 +1432,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
udata.mesg = *layout;
udata.addr = HADDR_UNDEF;
status = H5B_find (f, dxpl_id, H5B_ISTORE, layout->addr, &udata);
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
if (status>=0 && H5F_addr_defined(udata.addr)) {
size_t chunk_alloc=0; /*allocated chunk size */
@ -2082,7 +2082,7 @@ H5F_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
/* Go get the chunk information */
if (H5B_find (f, dxpl_id, H5B_ISTORE, layout->addr, &udata)<0) {
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
HGOTO_ERROR(H5E_BTREE,H5E_NOTFOUND,HADDR_UNDEF,"Can't locate chunk info");
} /* end if */

View File

@ -1115,7 +1115,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
/* Remove the symbolic link value */
if ((s=H5HL_peek(f, dxpl_id, bt_udata->heap_addr, sn->entry[idx].cache.slink.lval_offset)))
H5HL_remove(f, dxpl_id, bt_udata->heap_addr, sn->entry[idx].cache.slink.lval_offset, HDstrlen(s)+1);
H5E_clear(H5E_get_my_stack()); /* no big deal */
H5E_clear(NULL); /* no big deal */
} else {
/* Decrement the reference count */
assert(H5F_addr_defined(sn->entry[idx].header));
@ -1126,7 +1126,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
/* Remove the name from the local heap */
if ((s=H5HL_peek(f, dxpl_id, bt_udata->heap_addr, sn->entry[idx].name_off)))
H5HL_remove(f, dxpl_id, bt_udata->heap_addr, sn->entry[idx].name_off, HDstrlen(s)+1);
H5E_clear(H5E_get_my_stack()); /* no big deal */
H5E_clear(NULL); /* no big deal */
/* Remove the entry from the symbol table node */
if (1==sn->nsyms) {
@ -1504,7 +1504,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
if (NULL == (sn = H5AC_protect(f, dxpl_id, H5AC_SNODE, addr, NULL, NULL))) {
H5G_bt_ud1_t udata; /*data to pass through B-tree */
H5E_clear(H5E_get_my_stack()); /* discard that error */
H5E_clear(NULL); /* discard that error */
udata.heap_addr = heap;
if ( H5B_debug(f, dxpl_id, addr, stream, indent, fwidth, H5B_SNODE, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node");

View File

@ -433,7 +433,7 @@ H5HL_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HL_t *heap)
/* Release old space on disk */
H5_CHECK_OVERFLOW(heap->disk_alloc,size_t,hsize_t);
H5MF_xfree(f, H5FD_MEM_LHEAP, dxpl_id, old_addr, (hsize_t)heap->disk_alloc);
H5E_clear(H5E_get_my_stack()); /*don't really care if the free failed */
H5E_clear(NULL); /*don't really care if the free failed */
/* Allocate new space on disk */
H5_CHECK_OVERFLOW(heap->mem_alloc,size_t,hsize_t);

View File

@ -1518,7 +1518,7 @@ H5O_read_real(H5G_entry_t *ent, const H5O_class_t *type, int sequence, void *mes
ret_value = (H5O_fast_g[cache_type]) (cache, type, mesg);
if (ret_value)
HGOTO_DONE(ret_value);
H5E_clear(H5E_get_my_stack()); /*don't care, try reading from header */
H5E_clear(NULL); /*don't care, try reading from header */
}
/* can we get it from the object header? */
@ -1829,7 +1829,7 @@ H5O_modify_real(H5G_entry_t *ent, const H5O_class_t *type, int overwrite,
* If the message isn't shared then turn off the shared bit
* and treat it as an unshared message.
*/
H5E_clear (H5E_get_my_stack());
H5E_clear (NULL);
flags &= ~H5O_FLAG_SHARED;
} else if (sh_mesg.in_gh) {
/*
@ -2101,7 +2101,7 @@ H5O_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_class_t *type,
* If the message isn't shared then turn off the shared bit
* and treat it as an unshared message.
*/
H5E_clear (H5E_get_my_stack());
H5E_clear (NULL);
flags &= ~H5O_FLAG_SHARED;
} else if (sh_mesg.in_gh) {
/*
@ -2926,7 +2926,7 @@ H5O_alloc(H5F_t *f, H5O_t *oh, const H5O_class_t *type, size_t size)
if ((idx = H5O_alloc_extend_chunk(oh, chunkno, size)) != UFAIL) {
break;
}
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
}
/*

View File

@ -1915,7 +1915,7 @@ H5T_term_interface(void)
(unsigned long)(path->func), path->name);
}
#endif
H5E_clear(H5E_get_my_stack()); /*ignore the error*/
H5E_clear(NULL); /*ignore the error*/
}
}
@ -2852,7 +2852,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
H5I_dec_ref(tmp_sid);
H5I_dec_ref(tmp_did);
tmp_sid = tmp_did = -1;
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
continue;
} /* end if */
@ -2894,7 +2894,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
tmp_sid = tmp_did = -1;
/* We don't care about any failures during the freeing process */
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
} /* end for */
} /* end else */
@ -3049,7 +3049,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
H5T_close(path->src);
H5T_close(path->dst);
H5FL_FREE(H5T_path_t,path);
H5E_clear(H5E_get_my_stack()); /*ignore all shutdown errors*/
H5E_clear(NULL); /*ignore all shutdown errors*/
}
done:
@ -4556,7 +4556,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
"conversion function (ignored)\n");
}
#endif
H5E_clear(H5E_get_my_stack()); /*ignore the error*/
H5E_clear(NULL); /*ignore the error*/
}
H5T_g.npaths = 1;
}
@ -4666,7 +4666,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
if ((H5T_g.soft[i].func) (src_id, dst_id, &(path->cdata),
(hsize_t)0, 0, 0, NULL, NULL, dxpl_id)<0) {
HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear(H5E_get_my_stack()); /*ignore the error*/
H5E_clear(NULL); /*ignore the error*/
} else {
HDstrcpy (path->name, H5T_g.soft[i].name);
path->func = H5T_g.soft[i].func;
@ -4716,7 +4716,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
(unsigned long)(path->func), path->name);
}
#endif
H5E_clear(H5E_get_my_stack()); /*ignore the failure*/
H5E_clear(NULL); /*ignore the failure*/
}
if (table->src) H5T_close(table->src);
if (table->dst) H5T_close(table->dst);

View File

@ -509,7 +509,7 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
if (NULL==(fclass=H5Z_find(dcpl_pline.filter[u].id))) {
/* Ignore errors from optional filters */
if (dcpl_pline.filter[u].flags & H5Z_FLAG_OPTIONAL)
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
else
HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located")
} /* end if */
@ -942,7 +942,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
*nbytes = *buf_size;
failed |= (unsigned)1 << idx;
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
} else {
*nbytes = new_nbytes;
}
@ -959,7 +959,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered")
failed |= (unsigned)1 << idx;
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
continue; /*filter excluded*/
}
fclass=&H5Z_table_g[fclass_idx];
@ -984,7 +984,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
}
failed |= (unsigned)1 << idx;
H5E_clear(H5E_get_my_stack());
H5E_clear(NULL);
} else {
*nbytes = new_nbytes;
}

View File

@ -1165,7 +1165,7 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
FUNC_ENTER_API_THREADSAFE; \
FUNC_ENTER_API_COMMON(func_name,INTERFACE_INIT,err); \
/* Clear thread error stack entering public functions */ \
H5E_clear(H5E_get_my_stack()); \
H5E_clear(NULL); \
{
/*