summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Attribute.cpp
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-04-21 14:58:43 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-04-21 14:58:43 (GMT)
commit65b3bc2a937337239ceede5e39261c6b2ba4dc69 (patch)
treec6139980f34978fefe3fad3c756d4916f4d7d389 /c++/src/H5Attribute.cpp
parent3f36df51d845a93e94fff264fa22ad60a71db754 (diff)
downloadhdf5-65b3bc2a937337239ceede5e39261c6b2ba4dc69.zip
hdf5-65b3bc2a937337239ceede5e39261c6b2ba4dc69.tar.gz
hdf5-65b3bc2a937337239ceede5e39261c6b2ba4dc69.tar.bz2
[svn-r26861] Bring revisions #26401 - #26459 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'c++/src/H5Attribute.cpp')
-rw-r--r--c++/src/H5Attribute.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index a9e928d..6b5c753 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -392,10 +392,12 @@ H5std_string Attribute::getName() const
//--------------------------------------------------------------------------
H5std_string Attribute::getName(size_t len) const
{
- H5std_string attr_name;
- ssize_t name_size = getName(attr_name, len);
- return(attr_name);
- // let caller catch exception if any
+ H5std_string attr_name;
+ ssize_t name_size = getName(attr_name, len);
+ if (name_size < 0)
+ return("");
+ else
+ return(attr_name);
}
//--------------------------------------------------------------------------