From 05430861312f698dbed74dab32e4d0b6a3b6369e Mon Sep 17 00:00:00 2001 From: Roger Wolff Date: Wed, 9 Jun 1999 00:00:00 +0000 Subject: [PATCH] mtr v0.39 - Forgot the parentheses around the previous fix... :-( source: ftp://ftp.bitwizard.nl/mtr/mtr-0.39.tar.gz --- AUTHORS | 1 + configure.in | 2 +- dns.c | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 23623b4..f1daf1d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,6 +18,7 @@ Aaron Scarisbrick, Craig Milo Rogers (Rogers@ISI.EDU), Russell Nelson (rn-mtr@crynwr.com), + Davin Milun (milun@acm.org), Alexander V. Lukyanov (lav@yars.free.net), Charles Levert (charles@comm.polymtl.ca), Bertrand Leconte (B.Leconte@mail.dotcom.fr), diff --git a/configure.in b/configure.in index 820f854..d326fed 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.38) +AM_INIT_AUTOMAKE(mtr, 0.39) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) diff --git a/dns.c b/dns.c index a99d8df..3945fed 100644 --- a/dns.c +++ b/dns.c @@ -220,12 +220,12 @@ typedef struct { #define sucknetlong(x) (((long)*(x) << 24) | ((x)[1] << 16) | ((x)[2] << 8) | (((x)+= 4)[-1])) #else -#define sucknetword(x) ((word) (((x)[0] << 8) | ((x)[1] << 0))),(x)+=2 -#define sucknetshort(x) ((short) (((x)[0] << 8) | ((x)[1] << 0))),(x)+=2 -#define sucknetdword(x) ((dword) (((x)[0] << 24) | ((x)[1] << 16) | \ - ((x)[2] << 8) | ((x)[3] << 0))),(x)+=4 -#define sucknetlong(x) ((long) (((x)[0] << 24) | ((x)[1] << 16) | \ - ((x)[2] << 8) | ((x)[3] << 0))),(x)+=4 +#define sucknetword(x) ((x)+=2,((word) (((x)[-2] << 8) | ((x)[-1] << 0)))) +#define sucknetshort(x) ((x)+=2,((short) (((x)[-2] << 8) | ((x)[-1] << 0)))) +#define sucknetdword(x) ((x)+=4,((dword) (((x)[-4] << 24) | ((x)[-3] << 16) | \ + ((x)[-2] << 8) | ((x)[-1] << 0)))) +#define sucknetlong(x) ((x)+=4,((long) (((x)[-4] << 24) | ((x)[-3] << 16) | \ + ((x)[-2] << 8) | ((x)[-1] << 0)))) #endif enum { @@ -751,7 +751,7 @@ void restell(char *s){ void dorequest(char *s,int type,word id){ packetheader *hp; int r,i; - int buf[(MaxPacketsize/4)+1]; + int buf[(MaxPacketsize/sizeof (int))+1]; r = res_mkquery(QUERY,s,C_IN,type,NULL,0,NULL,buf,MaxPacketsize); if (r == -1){ restell("Resolver error: Query too large."); -- 2.47.3