Author: janderwald
Date: Mon Dec 4 00:51:50 2006
New Revision: 25056
URL:
http://svn.reactos.org/svn/reactos?rev=25056&view=rev
Log:
- fix some warnings when compiling with msvc
Modified:
trunk/reactos/base/applications/network/ping/ping.c
Modified: trunk/reactos/base/applications/network/ping/ping.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/ping/ping.c (original)
+++ trunk/reactos/base/applications/network/ping/ping.c Mon Dec 4 00:51:50 2006
@@ -179,7 +179,7 @@
{
UINT i, Length;
ULONG Value;
-
+ LPSTR StopString;
i = 0;
Length = (UINT)_tcslen(String);
while ((i < Length) && ((String[i] < '0') || (String[i] >
'9'))) i++;
@@ -187,7 +187,7 @@
InvalidOption = TRUE;
return 0;
}
- Value = (ULONG)atol(&String[i]);
+ Value = strtoul(&String[i], &StopString, 10);
return Value;
}
@@ -237,7 +237,7 @@
case 'n': PingCount = GetULONG2(&argv[i][2], argv[i + 1],
&i); break;
case 'l':
DataSize = GetULONG2(&argv[i][2], argv[i + 1], &i);
- if ((DataSize < 0) || (DataSize > ICMP_MAXSIZE -
sizeof(ICMP_ECHO_PACKET))) {
+ if (DataSize > ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET)) {
printf("Bad value for option -l, valid range is from 0 to
%d.\n",
ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET));
return FALSE;