From 0f15b4c999d25ee3460744e6e121c63bb72d8b94 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 8 Jan 2010 15:01:41 -0500 Subject: [svn-r18091] Fix coverity items 314 and 318. Changed the improper assertion of the return value of a library function to a check, and a return(void) on failure. Tested: Fedora --- tools/h5dump/h5dump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index a6c1f77..3ea201b 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -4519,7 +4519,8 @@ print_enum(hid_t type) unsigned i; snmembs = H5Tget_nmembers(type); - HDassert(snmembs >= 0); + if(snmembs < 0) + return; nmembs = (unsigned)snmembs; super = H5Tget_super(type); @@ -6701,7 +6702,8 @@ xml_print_enum(hid_t type) size_t j; snmembs = H5Tget_nmembers(type); - HDassert(snmembs >= 0); + if(snmembs < 0) + return; nmembs = (unsigned)snmembs; super = H5Tget_super(type); -- cgit v0.12