From e0161d8bf8d3a2e86002d34e13a3586ff62ef313 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 21 Feb 2013 13:18:52 +0100 Subject: Tidy up write_inp() --- libcrystfel/src/xds.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libcrystfel') 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"); -- cgit v1.2.3