aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-13 10:52:27 +0100
committerThomas White <taw@physics.org>2010-01-13 10:52:27 +0100
commit4608ebe9d1ae984667cf2d20f23fbf8807064afc (patch)
treed7a8bd954cfacc89656d24a2a592e23ac5fefa69 /src
parentf7d118ec0bc9e7dd964bbb9a8bc4fad46b8412d7 (diff)
Counting and error-checking fixes
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 7f863a65..3d5bdd27 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -126,11 +126,14 @@ int main(int argc, char *argv[])
STATUS("Processing '%s'\n", line);
+ n_images++;
+
hdfile = hdfile_open(line);
if ( hdfile == NULL ) {
- ERROR("Couldn't open file '%s'\n", filename);
+ continue;
} else if ( hdfile_set_first_image(hdfile, "/") ) {
ERROR("Couldn't select path\n");
+ continue;
}
hdf5_read(hdfile, &image);
@@ -158,8 +161,6 @@ int main(int argc, char *argv[])
}
- n_images++;
-
} while ( rval != NULL );
fclose(fh);