[segyio] 288/376: Reduce scope of variable

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:46 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 7513bf0681f4105689213a260c84030840db6e59
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Wed May 3 09:22:57 2017 +0200

    Reduce scope of variable
---
 python/segyio/_segyio.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/python/segyio/_segyio.c b/python/segyio/_segyio.c
index 09d3712..ea63528 100644
--- a/python/segyio/_segyio.c
+++ b/python/segyio/_segyio.c
@@ -574,17 +574,16 @@ static PyObject *py_field_foreach(PyObject *self, PyObject *args ) {
         return NULL;
     }
 
-    int err = 0;
     const int* ind = bufindices.buf;
     int* out = bufout.buf;
     for( int i = 0; i < len; ++i ) {
-        err = segy_field_forall( fp, field,
-                                 ind[ i ],
-                                 ind[ i ] + 1,
-                                 1,
-                                 out + i,
-                                 trace0,
-                                 trace_bsize );
+        int err = segy_field_forall( fp, field,
+                                     ind[ i ],
+                                     ind[ i ] + 1,
+                                     1,
+                                     out + i,
+                                     trace0,
+                                     trace_bsize );
 
         if( err != SEGY_OK ) {
             PyBuffer_Release( &bufout );

-- 
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