mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Fixed sign-compare warnings
This commit is contained in:
@@ -491,21 +491,26 @@ static DWORD filter_device_by_name_a(wLinkedList* list, LPSTR* mszReaders, DWORD
|
||||
|
||||
static DWORD filter_device_by_name_w(wLinkedList* list, LPWSTR* mszReaders, DWORD cchReaders)
|
||||
{
|
||||
int res;
|
||||
DWORD rc;
|
||||
LPSTR readers;
|
||||
|
||||
if (LinkedList_Count(list) < 1)
|
||||
return cchReaders;
|
||||
|
||||
if (ConvertFromUnicode(CP_UTF8, 0, *mszReaders, (int)cchReaders, &readers, 0, NULL,
|
||||
NULL) != cchReaders)
|
||||
res = ConvertFromUnicode(CP_UTF8, 0, *mszReaders, (int)cchReaders, &readers, 0, NULL,
|
||||
NULL);
|
||||
|
||||
if ((res < 0) || ((DWORD)res != cchReaders))
|
||||
return 0;
|
||||
|
||||
free(*mszReaders);
|
||||
*mszReaders = NULL;
|
||||
rc = filter_device_by_name_a(list, &readers, cchReaders);
|
||||
|
||||
if (ConvertToUnicode(CP_UTF8, 0, readers, (int)rc, mszReaders, 0) != rc)
|
||||
res = ConvertToUnicode(CP_UTF8, 0, readers, (int)rc, mszReaders, 0);
|
||||
|
||||
if ((res < 0) || ((DWORD)res != rc))
|
||||
rc = 0;
|
||||
|
||||
free(readers);
|
||||
|
||||
@@ -804,7 +804,7 @@ LONG smartcard_pack_list_readers_return(SMARTCARD_DEVICE* smartcard, wStream* s,
|
||||
void smartcard_trace_list_readers_return(SMARTCARD_DEVICE* smartcard, ListReaders_Return* ret,
|
||||
BOOL unicode)
|
||||
{
|
||||
int index;
|
||||
size_t index;
|
||||
size_t length;
|
||||
char* mszA = NULL;
|
||||
|
||||
@@ -1851,7 +1851,7 @@ LONG smartcard_pack_status_return(SMARTCARD_DEVICE* smartcard, wStream* s, Statu
|
||||
|
||||
void smartcard_trace_status_return(SMARTCARD_DEVICE* smartcard, Status_Return* ret, BOOL unicode)
|
||||
{
|
||||
int index;
|
||||
size_t index;
|
||||
size_t length;
|
||||
char* pbAtr = NULL;
|
||||
char* mszReaderNamesA = NULL;
|
||||
|
||||
Reference in New Issue
Block a user