diff options
author | Thomas White <taw@physics.org> | 2021-07-21 15:22:12 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-07-22 11:22:18 +0200 |
commit | 13d65b9785d1557e29f5f06871d01bad8e76e44c (patch) | |
tree | dfd9c52a80639882695eb63b0c87af06ebcbb29d /libcrystfel/src/stream.c | |
parent | d5cf0404a08253f52c6ddf3f6d80e694b9de4e7a (diff) |
Clean up shadowed variables
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r-- | libcrystfel/src/stream.c | 16 |
1 files changed, 8 insertions, 8 deletions
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; j<i->detgeom->n_panels; j++ ) { - tclen += i->detgeom->panels[j].cnz - * i->detgeom->panels[j].pixel_pitch; + for ( pn=0; pn<i->detgeom->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", |