From 13d65b9785d1557e29f5f06871d01bad8e76e44c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 21 Jul 2021 15:22:12 +0200 Subject: Clean up shadowed variables --- libcrystfel/src/stream.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libcrystfel/src/stream.c') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 6c716fda..3dc8abcd 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -240,7 +240,7 @@ static RefList *read_stream_reflections_2_3(Stream *st) char line[1024]; signed int h, k, l; float intensity, sigma, fs, ss, pk, bg; - char pn[32]; + char pname[32]; int r; rval = fgets(line, 1023, st->fh); @@ -252,7 +252,7 @@ static RefList *read_stream_reflections_2_3(Stream *st) r = sscanf(line, "%i %i %i %f %f %f %f %f %f %s", &h, &k, &l, &intensity, &sigma, &pk, &bg, - &fs, &ss, pn); + &fs, &ss, pname); if ( (r != 10) && (!first) ) { reflist_free(out); @@ -664,12 +664,12 @@ int stream_write_chunk(Stream *st, const struct image *i, if ( i->detgeom != NULL ) { - int j; + int pn; double tclen = 0.0; - for ( j=0; jdetgeom->n_panels; j++ ) { - tclen += i->detgeom->panels[j].cnz - * i->detgeom->panels[j].pixel_pitch; + for ( pn=0; pndetgeom->n_panels; pn++ ) { + tclen += i->detgeom->panels[pn].cnz + * i->detgeom->panels[pn].pixel_pitch; } fprintf(st->fh, "average_camera_length = %f m\n", tclen / i->detgeom->n_panels); @@ -814,8 +814,8 @@ static void read_crystal(Stream *st, struct image *image, } if ( strncmp(line, "num_saturated_reflections = ", 28) == 0 ) { - int n = atoi(line+28); - crystal_set_num_saturated_reflections(cr, n); + int nsat = atoi(line+28); + crystal_set_num_saturated_reflections(cr, nsat); } if ( sscanf(line, "diffraction_resolution_limit = %f nm^-1", -- cgit v1.2.3