Commit ed1711ec authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ntdll/tests: Avoid using the 'long' types.

parent 5c02e3f8
......@@ -116,7 +116,7 @@ ULONG_PTR completionKey;
IO_STATUS_BLOCK ioSb;
ULONG_PTR completionValue;
static long get_pending_msgs(HANDLE h)
static ULONG get_pending_msgs(HANDLE h)
{
NTSTATUS res;
ULONG a, req;
......@@ -911,13 +911,13 @@ static void nt_mailslot_test(void)
static void test_iocp_setcompletion(HANDLE h)
{
NTSTATUS res;
long count;
ULONG count;
res = pNtSetIoCompletion( h, CKEY_FIRST, CVALUE_FIRST, STATUS_INVALID_DEVICE_REQUEST, 3 );
ok( res == STATUS_SUCCESS, "NtSetIoCompletion failed: %x\n", res );
count = get_pending_msgs(h);
ok( count == 1, "Unexpected msg count: %ld\n", count );
ok( count == 1, "Unexpected msg count: %d\n", count );
if (get_msg(h))
{
......@@ -928,7 +928,7 @@ static void test_iocp_setcompletion(HANDLE h)
}
count = get_pending_msgs(h);
ok( !count, "Unexpected msg count: %ld\n", count );
ok( !count, "Unexpected msg count: %d\n", count );
}
static void test_iocp_fileio(HANDLE h)
......
......@@ -42,7 +42,7 @@ static VOID (WINAPI *pRtlCopyString)(STRING *, const STRING *);
static BOOLEAN (WINAPI *pRtlCreateUnicodeString)(PUNICODE_STRING, LPCWSTR);
static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR);
static NTSTATUS (WINAPI *pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
static NTSTATUS (WINAPI *pRtlDuplicateUnicodeString)(long, UNICODE_STRING *, UNICODE_STRING *);
static NTSTATUS (WINAPI *pRtlDuplicateUnicodeString)(int, UNICODE_STRING *, UNICODE_STRING *);
static BOOLEAN (WINAPI *pRtlEqualUnicodeString)(const UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
static NTSTATUS (WINAPI *pRtlFindCharInUnicodeString)(int, const UNICODE_STRING *, const UNICODE_STRING *, USHORT *);
static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING);
......@@ -53,14 +53,14 @@ static VOID (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING, LPCWSTR);
static NTSTATUS (WINAPI *pRtlInitUnicodeStringEx)(PUNICODE_STRING, LPCWSTR);
static NTSTATUS (WINAPI *pRtlIntegerToChar)(ULONG, ULONG, ULONG, PCHAR);
static NTSTATUS (WINAPI *pRtlIntegerToUnicodeString)(ULONG, ULONG, UNICODE_STRING *);
static NTSTATUS (WINAPI *pRtlMultiAppendUnicodeStringBuffer)(UNICODE_STRING *, long, UNICODE_STRING *);
static NTSTATUS (WINAPI *pRtlMultiAppendUnicodeStringBuffer)(UNICODE_STRING *, LONG, UNICODE_STRING *);
static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN);
static NTSTATUS (WINAPI *pRtlUnicodeStringToInteger)(const UNICODE_STRING *, int, int *);
static WCHAR (WINAPI *pRtlUpcaseUnicodeChar)(WCHAR);
static NTSTATUS (WINAPI *pRtlUpcaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
static CHAR (WINAPI *pRtlUpperChar)(CHAR);
static NTSTATUS (WINAPI *pRtlUpperString)(STRING *, const STRING *);
static NTSTATUS (WINAPI *pRtlValidateUnicodeString)(long, UNICODE_STRING *);
static NTSTATUS (WINAPI *pRtlValidateUnicodeString)(LONG, UNICODE_STRING *);
static NTSTATUS (WINAPI *pRtlGUIDFromString)(const UNICODE_STRING*,GUID*);
static NTSTATUS (WINAPI *pRtlStringFromGUID)(const GUID*, UNICODE_STRING*);
static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *);
......
......@@ -37,8 +37,8 @@ static int (WINAPIV *patoi)(const char *);
static long (WINAPIV *patol)(const char *);
static LONGLONG (WINAPIV *p_atoi64)(const char *);
static LPSTR (WINAPIV *p_itoa)(int, LPSTR, INT);
static LPSTR (WINAPIV *p_ltoa)(long, LPSTR, INT);
static LPSTR (WINAPIV *p_ultoa)(unsigned long, LPSTR, INT);
static LPSTR (WINAPIV *p_ltoa)(LONG, LPSTR, INT);
static LPSTR (WINAPIV *p_ultoa)(ULONG, LPSTR, INT);
static LPSTR (WINAPIV *p_i64toa)(LONGLONG, LPSTR, INT);
static LPSTR (WINAPIV *p_ui64toa)(ULONGLONG, LPSTR, INT);
......@@ -46,8 +46,8 @@ static int (WINAPIV *p_wtoi)(LPWSTR);
static long (WINAPIV *p_wtol)(LPWSTR);
static LONGLONG (WINAPIV *p_wtoi64)(LPWSTR);
static LPWSTR (WINAPIV *p_itow)(int, LPWSTR, int);
static LPWSTR (WINAPIV *p_ltow)(long, LPWSTR, INT);
static LPWSTR (WINAPIV *p_ultow)(unsigned long, LPWSTR, INT);
static LPWSTR (WINAPIV *p_ltow)(LONG, LPWSTR, INT);
static LPWSTR (WINAPIV *p_ultow)(ULONG, LPWSTR, INT);
static LPWSTR (WINAPIV *p_i64tow)(LONGLONG, LPWSTR, INT);
static LPWSTR (WINAPIV *p_ui64tow)(ULONGLONG, LPWSTR, INT);
......@@ -228,7 +228,7 @@ static void one_itoa_test(int test_num, const ulong2str_t *ulong2str)
static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
{
char dest_str[LARGE_STRI_BUFFER_LENGTH + 1];
long value;
LONG value;
LPSTR result;
memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH);
......@@ -236,10 +236,10 @@ static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
value = ulong2str->value;
result = p_ltoa(ulong2str->value, dest_str, ulong2str->base);
ok(result == dest_str,
"(test %d): _ltoa(%ld, [out], %d) has result %p, expected: %p\n",
"(test %d): _ltoa(%d, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_str);
ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _ltoa(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _ltoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, dest_str, ulong2str->Buffer);
}
......@@ -247,7 +247,7 @@ static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str)
{
char dest_str[LARGE_STRI_BUFFER_LENGTH + 1];
unsigned long value;
ULONG value;
LPSTR result;
memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH);
......@@ -255,10 +255,10 @@ static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str)
value = ulong2str->value;
result = p_ultoa(ulong2str->value, dest_str, ulong2str->base);
ok(result == dest_str,
"(test %d): _ultoa(%lu, [out], %d) has result %p, expected: %p\n",
"(test %d): _ultoa(%u, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_str);
ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _ultoa(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _ultoa(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, dest_str, ulong2str->Buffer);
}
......@@ -323,7 +323,7 @@ static void one_ltow_test(int test_num, const ulong2str_t *ulong2str)
WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1];
UNICODE_STRING unicode_string;
STRING ansi_str;
long value;
LONG value;
LPWSTR result;
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
......@@ -343,10 +343,10 @@ static void one_ltow_test(int test_num, const ulong2str_t *ulong2str)
result = p_ltow(value, dest_wstr, ulong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _ltow(%ld, [out], %d) has result %p, expected: %p\n",
"(test %d): _ltow(%d, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ltow(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _ltow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
......@@ -359,7 +359,7 @@ static void one_ultow_test(int test_num, const ulong2str_t *ulong2str)
WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1];
UNICODE_STRING unicode_string;
STRING ansi_str;
unsigned long value;
ULONG value;
LPWSTR result;
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
......@@ -379,10 +379,10 @@ static void one_ultow_test(int test_num, const ulong2str_t *ulong2str)
result = p_ultow(value, dest_wstr, ulong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _ultow(%lu, [out], %d) has result %p, expected: %p\n",
"(test %d): _ultow(%u, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ultow(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _ultow(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment