mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 08:03:01 +00:00
- fix some warnings when compiling with msvc
svn path=/trunk/; revision=25056
This commit is contained in:
parent
f737754b34
commit
4c44ec895f
1 changed files with 3 additions and 3 deletions
|
@ -179,7 +179,7 @@ static ULONG GetULONG(LPSTR String)
|
||||||
{
|
{
|
||||||
UINT i, Length;
|
UINT i, Length;
|
||||||
ULONG Value;
|
ULONG Value;
|
||||||
|
LPSTR StopString;
|
||||||
i = 0;
|
i = 0;
|
||||||
Length = (UINT)_tcslen(String);
|
Length = (UINT)_tcslen(String);
|
||||||
while ((i < Length) && ((String[i] < '0') || (String[i] > '9'))) i++;
|
while ((i < Length) && ((String[i] < '0') || (String[i] > '9'))) i++;
|
||||||
|
@ -187,7 +187,7 @@ static ULONG GetULONG(LPSTR String)
|
||||||
InvalidOption = TRUE;
|
InvalidOption = TRUE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Value = (ULONG)atol(&String[i]);
|
Value = strtoul(&String[i], &StopString, 10);
|
||||||
|
|
||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ static BOOL ParseCmdline(int argc, char* argv[])
|
||||||
case 'n': PingCount = GetULONG2(&argv[i][2], argv[i + 1], &i); break;
|
case 'n': PingCount = GetULONG2(&argv[i][2], argv[i + 1], &i); break;
|
||||||
case 'l':
|
case 'l':
|
||||||
DataSize = GetULONG2(&argv[i][2], argv[i + 1], &i);
|
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",
|
printf("Bad value for option -l, valid range is from 0 to %d.\n",
|
||||||
ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET));
|
ICMP_MAXSIZE - sizeof(ICMP_ECHO_PACKET));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue