]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Changed MAXPATH to MAX_PATH for AIX compatibility. -- aixtools
authorR.E. Wolff <R.E.Wolff@BitWizard.nl>
Wed, 23 Sep 2020 15:28:49 +0000 (17:28 +0200)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Wed, 23 Sep 2020 15:28:49 +0000 (17:28 +0200)
ui/curses.c
ui/mtr.h
ui/net.c
ui/report.c

index 3e63da57332eba986124f93fb475cd30b6d13aad..34bf30d638400dacd6f26ddf1e85c67327a79c79 100644 (file)
@@ -471,7 +471,7 @@ static void mtr_curses_hosts(
             }
 
             /* Multi path */
-            for (i = 0; i < MAXPATH; i++) {
+            for (i = 0; i < MAX_PATH; i++) {
                 addrs = net_addrs(at, i);
                 mplss = net_mplss(at, i);
                 if (addrcmp(addrs, addr, ctl->af) == 0)
index ac380163e4df46f186a572617d83a7ccaa736292..01536f52646480a6e2bda89505c43496c2a10723 100644 (file)
--- a/ui/mtr.h
+++ b/ui/mtr.h
@@ -61,7 +61,7 @@ typedef int time_t;
 
 /* net related definitions */
 #define SAVED_PINGS 200
-#define MAXPATH 8
+#define MAX_PATH 8
 #define MaxHost 256
 #define MinPort 1024
 #define MaxPort 65535
index 8f216cea77ca0c94feeee1465b4f6c3547169c23..f684b3e9ca13935d8f08a458e79654117658f72b 100644 (file)
--- a/ui/net.c
+++ b/ui/net.c
@@ -48,7 +48,7 @@ static int packetsize;          /* packet size used by ping */
 
 struct nethost {
     ip_t addr;                  /* Latest host to respond */
-    ip_t addrs[MAXPATH];        /* For Multi paths/Path Changes: List of all hosts that have responded */
+    ip_t addrs[MAX_PATH];        /* For Multi paths/Path Changes: List of all hosts that have responded */
     int err;
     int xmit;
     int returned;
@@ -68,7 +68,7 @@ struct nethost {
     int saved[SAVED_PINGS];
     int saved_seq_offset;
     struct mplslen mpls;
-    struct mplslen mplss[MAXPATH];
+    struct mplslen mplss[MAX_PATH];
 };
 
 
@@ -239,7 +239,7 @@ static void net_process_ping(
 
 
     if (addrcmp(&nh->addr, &addrcopy, ctl->af) != 0) {
-        for (i = 0; i < MAXPATH;) {
+        for (i = 0; i < MAX_PATH;) {
             if (addrcmp(&nh->addrs[i], &nh->addr, ctl->af) == 0) {
                 found = 1; /* This host is already in the list */
                 break;
@@ -250,7 +250,7 @@ static void net_process_ping(
             i++;
         }
 
-        if (found == 0 && i < MAXPATH) {
+        if (found == 0 && i < MAX_PATH) {
             memcpy(&nh->addrs[i], &nh->addr, sockaddr_addr_size(sourcesockaddr));
 
             nh->mplss[i] = nh->mpls;
index 26b2543477842637e34fabd5899eb3cc8b559b87..b79f593713d349dbd04eabd8ad769d8f29a6e84c 100644 (file)
@@ -185,7 +185,7 @@ void report_close(
         /* This feature shows 'loadbalances' on routes */
 
         /* Print list of all hosts that have responded from ttl = at + 1 away */
-        for (z = 0; z < MAXPATH; z++) {
+        for (z = 0; z < MAX_PATH; z++) {
             int found = 0;
             addr2 = net_addrs(at, z);
             mplss = net_mplss(at, z);