]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
cleanup: correct display_offset variable usage
authorSami Kerola <kerolasa@iki.fi>
Sun, 4 Sep 2016 19:18:00 +0000 (20:18 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sun, 4 Sep 2016 20:13:40 +0000 (21:13 +0100)
Variable display_offset was missed to move from local scope to control
structure in file it had it as local.

select.c

index 208ccbe37d44b0a25cd211de2966a9dfc53101e0..4bf3c3da53b0fe46f6693cf496fd11aa6eabceb5 100644 (file)
--- a/select.c
+++ b/select.c
@@ -42,7 +42,6 @@
 
 static double dnsinterval;
 static struct timeval intervaltime;
-int display_offset = 0;
 
 #define GRACETIME (ctl->GraceTime * 1000*1000)
 
@@ -246,12 +245,12 @@ extern void select_loop(struct mtr_ctl *ctl){
 #endif
 
       case ActionScrollDown:
-        display_offset += 5;
+        ctl->display_offset += 5;
        break;
       case ActionScrollUp:
-        display_offset -= 5;
-       if (display_offset < 0) {
-         display_offset = 0;
+        ctl->display_offset -= 5;
+       if (ctl->display_offset < 0) {
+         ctl->display_offset = 0;
        }
        break;
       }