summaryrefslogtreecommitdiffstats
path: root/tools/h5ls/h5ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5ls/h5ls.c')
-rw-r--r--tools/h5ls/h5ls.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index cd2de6f..a1a7f3b 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -78,7 +78,6 @@ static herr_t list (hid_t group, const char *name, void *cd);
static void display_type(hid_t type, int ind);
static char *fix_name(const char *path, const char *base);
-hid_t thefile;
const char *progname="h5ls";
int d_status;
@@ -1823,10 +1822,10 @@ list (hid_t group, const char *name, void *_iter)
/* Show detailed information about the object, beginning with information
* which is common to all objects. */
if (verbose_g>0 && H5G_LINK!=sb.type) {
- if (sb.type>=0) H5Aiterate(obj, NULL, list_attr, NULL);
- printf(" %-10s %lu:"H5_PRINTF_HADDR_FMT"\n", "Location:",
- sb.fileno, sb.objno);
- printf(" %-10s %u\n", "Links:", sb.nlink);
+ if (sb.type>=0)
+ H5Aiterate(obj, NULL, list_attr, NULL);
+ printf(" %-10s %lu:"H5_PRINTF_HADDR_FMT"\n", "Location:", sb.fileno, sb.objno);
+ printf(" %-10s %u\n", "Links:", sb.nlink);
if (sb.mtime>0) {
if (simple_output_g) tm=gmtime(&(sb.mtime));
else tm=localtime(&(sb.mtime));