[segyio] 57/376: Rename to avoid shadowing.

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

jokva-guest pushed a commit to branch debian
in repository segyio.

commit 0b5901f6563f94ad93fb7ee262b37b6a3085b41e
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Wed Oct 19 14:04:03 2016 +0200

    Rename to avoid shadowing.
---
 src/applications/segyinfo.c | 8 ++++----
 tests/test_segy.c           | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/applications/segyinfo.c b/src/applications/segyinfo.c
index 9efb717..c6bd858 100644
--- a/src/applications/segyinfo.c
+++ b/src/applications/segyinfo.c
@@ -105,16 +105,16 @@ int main(int argc, char* argv[]) {
             exit( err );
         }
 
-        int samples;
-        err = segy_get_field( traceh, TRACE_SAMPLE_COUNT, &samples );
+        int sample_count;
+        err = segy_get_field( traceh, TRACE_SAMPLE_COUNT, &sample_count );
 
         if( err != 0 ) {
             fprintf( stderr, "Invalid trace header field: %d\n", TRACE_SAMPLE_COUNT );
             exit( err );
         }
 
-        min_sample_count = minimum( samples, min_sample_count );
-        max_sample_count = maximum( samples, max_sample_count );
+        min_sample_count = minimum( sample_count, min_sample_count );
+        max_sample_count = maximum( sample_count, max_sample_count );
     }
 
     puts("");
diff --git a/tests/test_segy.c b/tests/test_segy.c
index d508914..f5d7128 100644
--- a/tests/test_segy.c
+++ b/tests/test_segy.c
@@ -342,8 +342,8 @@ void testReadCrossLine_22(){
     assertClose(5.22049f, data[samples*last_line+samples-1], 0.0001);
 
     for( float* ptr = data; ptr < data + (samples * line_length); ++ptr ) {
-        float xl = *ptr - floorf(*ptr);
-        assertTrue( 0.219f <= xl && xl <= 0.231f, "Sample value not in range" );
+        float x = *ptr - floorf(*ptr);
+        assertTrue( 0.219f <= x && x <= 0.231f, "Sample value not in range" );
     }
 
     free(data);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git



More information about the debian-science-commits mailing list