Michael C. Toren on Sat, 1 Dec 2001 16:33:27 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[tcptra-dev] tcptraceroute-1.3beta4


> tcptraceroute-1.3beta3 is now available on the beta website,
> <http://michael.toren.net/code/tcptraceroute/beta.html>.  The only
> major change since 1.3beta2 is that --track-port is now the default
> under Solaris -- I have received reports from several Solaris users
> saying that 1.3beta2 functions properly when used with --track-port.

tcptraceroute-1.3beta4 is now available; minor changes to prevent
some compiler warnings from showing up under Solaris, which were
fixed by casting the argument passed to isprint() to an unsigned
char.  The patch is attached.

-mct
--- tcptraceroute-1.3beta3/tcptraceroute.c	Sat Dec  1 13:20:22 2001
+++ tcptraceroute-1.3beta4/tcptraceroute.c	Sat Dec  1 16:14:56 2001
@@ -30,14 +30,14 @@
  * Updates are available from http://michael.toren.net/code/tcptraceroute/
  */
 
-#define VERSION "tcptraceroute 1.3beta3 (2001-12-01)"
+#define VERSION "tcptraceroute 1.3beta4 (2001-12-01)"
 #define BANNER  "Copyright (c) 2001, Michael C. Toren <mct@toren.net>\n\
 Updates are available from http://michael.toren.net/code/tcptraceroute/\n";
 
 /*
  * Revision history:
  *
- *	Version 1.3beta3 (2001-12-01)
+ *	Version 1.3beta4 (2001-12-01)
  *
  *		probe() and capture() now use a new proberecord structure which
  *		contains information about each probe in a modularized way.
@@ -428,7 +428,7 @@
 		safe_strncpy(buf, "(empty)", TEXTSIZE);
 
 	for (i = 0; buf[i]; i++)
-		if (! isprint(buf[i]))
+		if (! isprint((unsigned char) buf[i]))
 			buf[i] = '?';
 
 	return buf;
@@ -1576,12 +1576,12 @@
 	opt = s[0];
 	s++;
 
-	if (isdigit(s[0]))
+	if (isdigit((unsigned char) s[0]))
 	{
 		safe_strncpy(buf, s, TEXTSIZE);
 
 		for (i = 0; buf[i]; i++)
-			if (!isdigit(buf[i]))
+			if (!isdigit((unsigned char) buf[i]))
 			{
 				buf[i] = '\0';
 				break;
@@ -1599,7 +1599,7 @@
 		(*argc)--, (*argv)++;
 
 		for (s = (*argv)[0], i = 0; s[i]; i++)
-			if (!isdigit(s[i]))
+			if (!isdigit((unsigned char) s[i]))
 				fatal("Numeric argument required for -%c\n", opt);
 
 		value = atoi(s);