aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-21 13:18:52 +0100
committerThomas White <taw@physics.org>2013-02-21 13:18:52 +0100
commite0161d8bf8d3a2e86002d34e13a3586ff62ef313 (patch)
tree850a5e8ad53126bde19685e312b5cdd841b52152 /libcrystfel/src
parenta5b8b38c185bd69638575976fb76ec9b1bee86f6 (diff)
Tidy up write_inp()
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/xds.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c
index ad512ab1..5d9d4bfa 100644
--- a/libcrystfel/src/xds.c
+++ b/libcrystfel/src/xds.c
@@ -463,7 +463,7 @@ static int write_inp(struct image *image, struct xds_private *xp)
fh = fopen("XDS.INP", "w");
if ( !fh ) {
ERROR("Couldn't open XDS.INP\n");
- return 0;
+ return 1;
}
fprintf(fh, "JOB= IDXREF\n");
@@ -539,14 +539,12 @@ int run_xds(struct image *image, IndexingPrivate *priv)
xds->target_cell = xp->cell;
- write_inp(image, xp);
-
- if ( write_inp == NULL ) {
+ if ( write_inp(image, xp) ) {
ERROR("Failed to write XDS.INP file for XDS.\n");
return 0;
}
- n= image_feature_count(image->features);
+ n = image_feature_count(image->features);
if (n < 25) return 0;
snprintf(xds->spotfile, 127, "SPOT.XDS");