Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a107234d
Commit
a107234d
authored
Aug 29, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gcc 4.0 warning fixes.
parent
3abfd8a8
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
70 additions
and
69 deletions
+70
-69
encode.c
dlls/crypt32/encode.c
+6
-6
protectdata.c
dlls/crypt32/protectdata.c
+10
-7
main.c
dlls/crypt32/tests/main.c
+6
-5
protectdata.c
dlls/crypt32/tests/protectdata.c
+3
-3
joystick_linux.c
dlls/dinput/joystick_linux.c
+2
-2
icmp_main.c
dlls/icmp/icmp_main.c
+3
-3
chm_lib.c
dlls/itss/chm_lib.c
+12
-15
lzx.c
dlls/itss/lzx.c
+2
-2
nbnamecache.c
dlls/netapi32/nbnamecache.c
+3
-3
nbt.c
dlls/netapi32/nbt.c
+11
-11
proxyodbc.c
dlls/odbc32/proxyodbc.c
+10
-10
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+2
-2
No files found.
dlls/crypt32/encode.c
View file @
a107234d
...
@@ -242,7 +242,7 @@ BOOL WINAPI CryptRegisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName,
...
@@ -242,7 +242,7 @@ BOOL WINAPI CryptRegisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName,
/* write the values */
/* write the values */
if
(
pszOverrideFuncName
)
if
(
pszOverrideFuncName
)
RegSetValueExA
(
hKey
,
"FuncName"
,
0
,
REG_SZ
,
pszOverrideFuncName
,
RegSetValueExA
(
hKey
,
"FuncName"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
pszOverrideFuncName
,
lstrlenA
(
pszOverrideFuncName
)
+
1
);
lstrlenA
(
pszOverrideFuncName
)
+
1
);
RegSetValueExW
(
hKey
,
szDllName
,
0
,
REG_SZ
,
(
const
BYTE
*
)
pwszDll
,
RegSetValueExW
(
hKey
,
szDllName
,
0
,
REG_SZ
,
(
const
BYTE
*
)
pwszDll
,
(
lstrlenW
(
pwszDll
)
+
1
)
*
sizeof
(
WCHAR
));
(
lstrlenW
(
pwszDll
)
+
1
)
*
sizeof
(
WCHAR
));
...
@@ -2574,7 +2574,7 @@ static BOOL CRYPT_AsnDecodeExtension(const BYTE *pbEncoded, DWORD cbEncoded,
...
@@ -2574,7 +2574,7 @@ static BOOL CRYPT_AsnDecodeExtension(const BYTE *pbEncoded, DWORD cbEncoded,
&
ext
->
Value
,
&
dataLen
);
&
ext
->
Value
,
&
dataLen
);
if
(
ret
)
if
(
ret
)
{
{
ext
->
pszObjId
=
ext
->
Value
.
pbData
+
ext
->
pszObjId
=
(
LPSTR
)
ext
->
Value
.
pbData
+
ext
->
Value
.
cbData
;
ext
->
Value
.
cbData
;
ptr
=
pbEncoded
+
1
+
lenBytes
;
ptr
=
pbEncoded
+
1
+
lenBytes
;
ret
=
CRYPT_AsnDecodeOid
(
ptr
,
ret
=
CRYPT_AsnDecodeOid
(
ptr
,
...
@@ -3024,7 +3024,7 @@ static BOOL WINAPI CRYPT_AsnDecodeRdnAttr(const BYTE *pbEncoded,
...
@@ -3024,7 +3024,7 @@ static BOOL WINAPI CRYPT_AsnDecodeRdnAttr(const BYTE *pbEncoded,
(
LPSTR
)(
attr
->
Value
.
pbData
+
(
LPSTR
)(
attr
->
Value
.
pbData
+
attr
->
Value
.
cbData
);
attr
->
Value
.
cbData
);
else
else
attr
->
pszObjId
=
originalData
;
attr
->
pszObjId
=
(
LPSTR
)
originalData
;
size
=
bytesNeeded
-
size
;
size
=
bytesNeeded
-
size
;
ret
=
CRYPT_AsnDecodeOid
(
ret
=
CRYPT_AsnDecodeOid
(
pbEncoded
+
objIdOfset
,
pbEncoded
+
objIdOfset
,
...
@@ -3355,17 +3355,17 @@ static BOOL WINAPI CRYPT_AsnDecodeAlgorithmId(DWORD dwCertEncodingType,
...
@@ -3355,17 +3355,17 @@ static BOOL WINAPI CRYPT_AsnDecodeAlgorithmId(DWORD dwCertEncodingType,
{
{
memcpy
(
algo
->
Parameters
.
pbData
,
ptr
,
memcpy
(
algo
->
Parameters
.
pbData
,
ptr
,
algo
->
Parameters
.
cbData
);
algo
->
Parameters
.
cbData
);
algo
->
pszObjId
=
algo
->
Parameters
.
pbData
+
algo
->
pszObjId
=
(
LPSTR
)
algo
->
Parameters
.
pbData
+
algo
->
Parameters
.
cbData
;
algo
->
Parameters
.
cbData
;
}
}
else
else
{
{
algo
->
Parameters
.
pbData
=
(
BYTE
*
)
ptr
;
algo
->
Parameters
.
pbData
=
(
BYTE
*
)
ptr
;
algo
->
pszObjId
=
algo
->
Parameters
.
pbData
;
algo
->
pszObjId
=
(
LPSTR
)
algo
->
Parameters
.
pbData
;
}
}
}
}
else
else
algo
->
pszObjId
=
algo
->
Parameters
.
pbData
;
algo
->
pszObjId
=
(
LPSTR
)
algo
->
Parameters
.
pbData
;
ptr
=
pbEncoded
+
1
+
lenBytes
;
ptr
=
pbEncoded
+
1
+
lenBytes
;
ret
=
CRYPT_AsnDecodeOid
(
ptr
,
ret
=
CRYPT_AsnDecodeOid
(
ptr
,
cbEncoded
-
(
ptr
-
pbEncoded
),
cbEncoded
-
(
ptr
-
pbEncoded
),
...
...
dlls/crypt32/protectdata.c
View file @
a107234d
...
@@ -52,7 +52,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
...
@@ -52,7 +52,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
#define CRYPT32_PROTECTDATA_KEY_CALG CALG_RC2
#define CRYPT32_PROTECTDATA_KEY_CALG CALG_RC2
#define CRYPT32_PROTECTDATA_SALT_LEN 16
#define CRYPT32_PROTECTDATA_SALT_LEN 16
#define CRYPT32_PROTECTDATA_SECRET "I'm hunting wabbits"
static
const
BYTE
crypt32_protectdata_secret
[]
=
{
'I'
,
'\''
,
'm'
,
' '
,
'h'
,
'u'
,
'n'
,
't'
,
'i'
,
'n'
,
'g'
,
' '
,
'w'
,
'a'
,
'b'
,
'b'
,
'i'
,
't'
,
's'
,
0
};
/*
/*
* The data format returned by the real Windows CryptProtectData seems
* The data format returned by the real Windows CryptProtectData seems
...
@@ -513,7 +516,7 @@ BOOL valid_protect_data(struct protect_data_t * pInfo)
...
@@ -513,7 +516,7 @@ BOOL valid_protect_data(struct protect_data_t * pInfo)
* implementation of CryptProtectData.
* implementation of CryptProtectData.
*/
*/
if
(
pInfo
->
info0
.
cbData
!=
strlen
(
crypt_magic_str
)
+
1
||
if
(
pInfo
->
info0
.
cbData
!=
strlen
(
crypt_magic_str
)
+
1
||
strcmp
(
pInfo
->
info0
.
pbData
,
crypt_magic_str
)
!=
0
)
strcmp
(
(
LPCSTR
)
pInfo
->
info0
.
pbData
,
crypt_magic_str
)
!=
0
)
{
{
ERR
(
"info0 magic value not matched !
\n
"
);
ERR
(
"info0 magic value not matched !
\n
"
);
status
=
FALSE
;
status
=
FALSE
;
...
@@ -562,7 +565,7 @@ BYTE * convert_str_to_blob(char* str, DATA_BLOB* blob)
...
@@ -562,7 +565,7 @@ BYTE * convert_str_to_blob(char* str, DATA_BLOB* blob)
blob
->
cbData
=
0
;
blob
->
cbData
=
0
;
}
}
else
{
else
{
strcpy
(
blob
->
pbData
,
str
);
strcpy
(
(
LPSTR
)
blob
->
pbData
,
str
);
}
}
return
blob
->
pbData
;
return
blob
->
pbData
;
...
@@ -743,9 +746,9 @@ BOOL load_encryption_key(HCRYPTPROV hProv, DATA_BLOB * salt,
...
@@ -743,9 +746,9 @@ BOOL load_encryption_key(HCRYPTPROV hProv, DATA_BLOB * salt,
* - randomness (from the salt)
* - randomness (from the salt)
* - user-supplied entropy
* - user-supplied entropy
*/
*/
if
((
szUsername
&&
!
CryptHashData
(
hSaltHash
,
szUsername
,
dwUsernameLen
,
0
))
||
if
((
szUsername
&&
!
CryptHashData
(
hSaltHash
,
(
LPBYTE
)
szUsername
,
dwUsernameLen
,
0
))
||
!
CryptHashData
(
hSaltHash
,
CRYPT32_PROTECTDATA_SECRET
,
!
CryptHashData
(
hSaltHash
,
crypt32_protectdata_secret
,
s
trlen
(
CRYPT32_PROTECTDATA_SECRET
)
,
0
)
||
s
izeof
(
crypt32_protectdata_secret
)
-
1
,
0
)
||
!
CryptHashData
(
hSaltHash
,
salt
->
pbData
,
salt
->
cbData
,
0
)
||
!
CryptHashData
(
hSaltHash
,
salt
->
pbData
,
salt
->
cbData
,
0
)
||
(
pOptionalEntropy
&&
!
CryptHashData
(
hSaltHash
,
(
pOptionalEntropy
&&
!
CryptHashData
(
hSaltHash
,
pOptionalEntropy
->
pbData
,
pOptionalEntropy
->
pbData
,
...
@@ -791,7 +794,7 @@ report(DATA_BLOB* pDataIn, DATA_BLOB* pOptionalEntropy,
...
@@ -791,7 +794,7 @@ report(DATA_BLOB* pDataIn, DATA_BLOB* pOptionalEntropy,
if
(
pOptionalEntropy
)
if
(
pOptionalEntropy
)
{
{
TRACE_DATA_BLOB
(
pOptionalEntropy
);
TRACE_DATA_BLOB
(
pOptionalEntropy
);
TRACE
(
" %s
\n
"
,
debugstr_an
(
pOptionalEntropy
->
pbData
,
pOptionalEntropy
->
cbData
));
TRACE
(
" %s
\n
"
,
debugstr_an
(
(
LPCSTR
)
pOptionalEntropy
->
pbData
,
pOptionalEntropy
->
cbData
));
}
}
}
}
...
...
dlls/crypt32/tests/main.c
View file @
a107234d
...
@@ -116,9 +116,8 @@ static void testAlgIDToOID(void)
...
@@ -116,9 +116,8 @@ static void testAlgIDToOID(void)
static
void
test_findAttribute
(
void
)
static
void
test_findAttribute
(
void
)
{
{
PCRYPT_ATTRIBUTE
ret
;
PCRYPT_ATTRIBUTE
ret
;
CRYPT_ATTR_BLOB
blobs
[]
=
{
BYTE
blobbin
[]
=
{
0x02
,
0x01
,
0x01
};
{
3
,
"
\x02\x01\x01
"
},
CRYPT_ATTR_BLOB
blobs
[]
=
{
{
sizeof
blobbin
,
blobbin
},
};
};
CRYPT_ATTRIBUTE
attr
=
{
"1.2.3"
,
sizeof
(
blobs
)
/
sizeof
(
blobs
[
0
]),
blobs
};
CRYPT_ATTRIBUTE
attr
=
{
"1.2.3"
,
sizeof
(
blobs
)
/
sizeof
(
blobs
[
0
]),
blobs
};
/* returns NULL, last error not set */
/* returns NULL, last error not set */
...
@@ -158,7 +157,8 @@ static void test_findAttribute(void)
...
@@ -158,7 +157,8 @@ static void test_findAttribute(void)
static
void
test_findExtension
(
void
)
static
void
test_findExtension
(
void
)
{
{
PCERT_EXTENSION
ret
;
PCERT_EXTENSION
ret
;
CERT_EXTENSION
ext
=
{
"1.2.3"
,
TRUE
,
{
3
,
"
\x02\x01\x01
"
}
};
BYTE
blobbin
[]
=
{
0x02
,
0x01
,
0x01
};
CERT_EXTENSION
ext
=
{
"1.2.3"
,
TRUE
,
{
sizeof
blobbin
,
blobbin
}
};
/* returns NULL, last error not set */
/* returns NULL, last error not set */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -197,8 +197,9 @@ static void test_findExtension(void)
...
@@ -197,8 +197,9 @@ static void test_findExtension(void)
static
void
test_findRDNAttr
(
void
)
static
void
test_findRDNAttr
(
void
)
{
{
PCERT_RDN_ATTR
ret
;
PCERT_RDN_ATTR
ret
;
BYTE
bin
[]
=
{
0x16
,
0x09
,
'J'
,
'u'
,
'a'
,
'n'
,
' '
,
'L'
,
'a'
,
'n'
,
'g'
};
CERT_RDN_ATTR
attrs
[]
=
{
CERT_RDN_ATTR
attrs
[]
=
{
{
"1.2.3"
,
CERT_RDN_IA5_STRING
,
{
11
,
"
\x16\x09
Juan Lang"
}
},
{
"1.2.3"
,
CERT_RDN_IA5_STRING
,
{
sizeof
bin
,
bin
}
},
};
};
CERT_RDN
rdns
[]
=
{
CERT_RDN
rdns
[]
=
{
{
sizeof
(
attrs
)
/
sizeof
(
attrs
[
0
]),
attrs
},
{
sizeof
(
attrs
)
/
sizeof
(
attrs
[
0
]),
attrs
},
...
...
dlls/crypt32/tests/protectdata.c
View file @
a107234d
...
@@ -144,7 +144,7 @@ static void test_cryptunprotectdata(void)
...
@@ -144,7 +144,7 @@ static void test_cryptunprotectdata(void)
ok
(
plain
.
pbData
!=
NULL
,
"Plain DATA_BLOB missing data
\n
"
);
ok
(
plain
.
pbData
!=
NULL
,
"Plain DATA_BLOB missing data
\n
"
);
ok
(
plain
.
cbData
==
strlen
(
secret
)
+
1
,
"Plain DATA_BLOB wrong length
\n
"
);
ok
(
plain
.
cbData
==
strlen
(
secret
)
+
1
,
"Plain DATA_BLOB wrong length
\n
"
);
ok
(
!
strcmp
(
plain
.
pbData
,
secret
),
"Plain does not match secret
\n
"
);
ok
(
!
strcmp
(
(
const
char
*
)
plain
.
pbData
,
secret
),
"Plain does not match secret
\n
"
);
ok
(
data_desc
!=
NULL
,
"Description not allocated
\n
"
);
ok
(
data_desc
!=
NULL
,
"Description not allocated
\n
"
);
ok
(
!
lstrcmpW
(
data_desc
,
desc
),
"Description does not match
\n
"
);
ok
(
!
lstrcmpW
(
data_desc
,
desc
),
"Description does not match
\n
"
);
...
@@ -171,7 +171,7 @@ static void test_cryptunprotectdata(void)
...
@@ -171,7 +171,7 @@ static void test_cryptunprotectdata(void)
ok
(
plain
.
pbData
!=
NULL
,
"Plain DATA_BLOB missing data
\n
"
);
ok
(
plain
.
pbData
!=
NULL
,
"Plain DATA_BLOB missing data
\n
"
);
ok
(
plain
.
cbData
==
strlen
(
secret
)
+
1
,
"Plain DATA_BLOB wrong length
\n
"
);
ok
(
plain
.
cbData
==
strlen
(
secret
)
+
1
,
"Plain DATA_BLOB wrong length
\n
"
);
ok
(
!
strcmp
(
plain
.
pbData
,
secret
),
"Plain does not match secret
\n
"
);
ok
(
!
strcmp
(
(
const
char
*
)
plain
.
pbData
,
secret
),
"Plain does not match secret
\n
"
);
ok
(
data_desc
!=
NULL
,
"Description not allocated
\n
"
);
ok
(
data_desc
!=
NULL
,
"Description not allocated
\n
"
);
ok
(
!
lstrcmpW
(
data_desc
,
desc
),
"Description does not match
\n
"
);
ok
(
!
lstrcmpW
(
data_desc
,
desc
),
"Description does not match
\n
"
);
...
@@ -191,7 +191,7 @@ static void test_cryptunprotectdata(void)
...
@@ -191,7 +191,7 @@ static void test_cryptunprotectdata(void)
ok
(
plain
.
pbData
!=
NULL
,
"Plain DATA_BLOB missing data
\n
"
);
ok
(
plain
.
pbData
!=
NULL
,
"Plain DATA_BLOB missing data
\n
"
);
ok
(
plain
.
cbData
==
strlen
(
secret2
)
+
1
,
"Plain DATA_BLOB wrong length
\n
"
);
ok
(
plain
.
cbData
==
strlen
(
secret2
)
+
1
,
"Plain DATA_BLOB wrong length
\n
"
);
ok
(
!
strcmp
(
plain
.
pbData
,
secret2
),
"Plain does not match secret
\n
"
);
ok
(
!
strcmp
(
(
const
char
*
)
plain
.
pbData
,
secret2
),
"Plain does not match secret
\n
"
);
ok
(
data_desc
!=
NULL
,
"Description not allocated
\n
"
);
ok
(
data_desc
!=
NULL
,
"Description not allocated
\n
"
);
ok
(
data_desc
[
0
]
==
'\0'
,
"Description not empty
\n
"
);
ok
(
data_desc
[
0
]
==
'\0'
,
"Description not empty
\n
"
);
...
...
dlls/dinput/joystick_linux.c
View file @
a107234d
...
@@ -254,10 +254,10 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
...
@@ -254,10 +254,10 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
inline
static
DWORD
get_config_key
(
HKEY
defkey
,
HKEY
appkey
,
const
char
*
name
,
inline
static
DWORD
get_config_key
(
HKEY
defkey
,
HKEY
appkey
,
const
char
*
name
,
char
*
buffer
,
DWORD
size
)
char
*
buffer
,
DWORD
size
)
{
{
if
(
appkey
&&
!
RegQueryValueExA
(
appkey
,
name
,
0
,
NULL
,
buffer
,
&
size
))
if
(
appkey
&&
!
RegQueryValueExA
(
appkey
,
name
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
size
))
return
0
;
return
0
;
if
(
defkey
&&
!
RegQueryValueExA
(
defkey
,
name
,
0
,
NULL
,
buffer
,
&
size
))
if
(
defkey
&&
!
RegQueryValueExA
(
defkey
,
name
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
size
))
return
0
;
return
0
;
return
ERROR_FILE_NOT_FOUND
;
return
ERROR_FILE_NOT_FOUND
;
...
...
dlls/icmp/icmp_main.c
View file @
a107234d
...
@@ -213,7 +213,7 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -213,7 +213,7 @@ DWORD WINAPI IcmpSendEcho(
struct
timeval
timeout
;
struct
timeval
timeout
;
DWORD
send_time
,
recv_time
;
DWORD
send_time
,
recv_time
;
struct
sockaddr_in
addr
;
struct
sockaddr_in
addr
;
int
addrlen
;
unsigned
int
addrlen
;
unsigned
short
id
,
seq
,
cksum
;
unsigned
short
id
,
seq
,
cksum
;
int
res
;
int
res
;
...
@@ -256,7 +256,7 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -256,7 +256,7 @@ DWORD WINAPI IcmpSendEcho(
if
(
RequestOptions
!=
NULL
)
{
if
(
RequestOptions
!=
NULL
)
{
int
val
;
int
val
;
if
(
icp
->
default_opts
.
OptionsSize
==
IP_OPTS_UNKNOWN
)
{
if
(
icp
->
default_opts
.
OptionsSize
==
IP_OPTS_UNKNOWN
)
{
int
len
;
unsigned
int
len
;
/* Before we mess with the options, get the default values */
/* Before we mess with the options, get the default values */
len
=
sizeof
(
val
);
len
=
sizeof
(
val
);
getsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TTL
,(
char
*
)
&
val
,
&
len
);
getsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TTL
,(
char
*
)
&
val
,
&
len
);
...
@@ -455,7 +455,7 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -455,7 +455,7 @@ DWORD WINAPI IcmpSendEcho(
ier
->
Options
.
OptionsData
=
(
unsigned
char
*
)
ier
->
Data
-
ier
->
Options
.
OptionsSize
;
ier
->
Options
.
OptionsData
=
(
unsigned
char
*
)
ier
->
Data
-
ier
->
Options
.
OptionsSize
;
/* FIXME: We are supposed to rearrange the option's 'source route' data */
/* FIXME: We are supposed to rearrange the option's 'source route' data */
memmove
(
ier
->
Options
.
OptionsData
,((
char
*
)
ip_header
)
+
ip_header_len
,
ier
->
Options
.
OptionsSize
);
memmove
(
ier
->
Options
.
OptionsData
,((
char
*
)
ip_header
)
+
ip_header_len
,
ier
->
Options
.
OptionsSize
);
endbuf
=
ier
->
Options
.
OptionsData
;
endbuf
=
(
char
*
)
ier
->
Options
.
OptionsData
;
}
else
{
}
else
{
ier
->
Options
.
OptionsData
=
NULL
;
ier
->
Options
.
OptionsData
=
NULL
;
endbuf
=
ier
->
Data
;
endbuf
=
ier
->
Data
;
...
...
dlls/itss/chm_lib.c
View file @
a107234d
...
@@ -573,15 +573,14 @@ static Int64 _chm_fetch_bytes(struct chmFile *h,
...
@@ -573,15 +573,14 @@ static Int64 _chm_fetch_bytes(struct chmFile *h,
CHM_ACQUIRE_LOCK
(
h
->
mutex
);
CHM_ACQUIRE_LOCK
(
h
->
mutex
);
/* NOTE: this might be better done with CreateFileMapping, et cetera... */
/* NOTE: this might be better done with CreateFileMapping, et cetera... */
{
{
DWORD
origOffsetLo
=
0
,
origOffsetHi
=
0
;
LARGE_INTEGER
old_pos
,
new_pos
;
DWORD
offsetLo
,
offsetHi
;
DWORD
actualLen
=
0
;
DWORD
actualLen
=
0
;
/* awkward Win32 Seek/Tell */
/* awkward Win32 Seek/Tell */
offsetLo
=
(
unsigned
long
)(
os
&
0xffffffffL
)
;
new_pos
.
QuadPart
=
0
;
offsetHi
=
(
unsigned
long
)((
os
>>
32
)
&
0xffffffffL
);
SetFilePointerEx
(
h
->
fd
,
new_pos
,
&
old_pos
,
FILE_CURRENT
);
origOffsetLo
=
SetFilePointer
(
h
->
fd
,
0
,
&
origOffsetHi
,
FILE_CURRENT
)
;
new_pos
.
QuadPart
=
os
;
offsetLo
=
SetFilePointer
(
h
->
fd
,
offsetLo
,
&
offsetHi
,
FILE_BEGIN
);
SetFilePointerEx
(
h
->
fd
,
new_pos
,
NULL
,
FILE_BEGIN
);
/* read the data */
/* read the data */
if
(
ReadFile
(
h
->
fd
,
if
(
ReadFile
(
h
->
fd
,
...
@@ -594,7 +593,7 @@ static Int64 _chm_fetch_bytes(struct chmFile *h,
...
@@ -594,7 +593,7 @@ static Int64 _chm_fetch_bytes(struct chmFile *h,
readLen
=
0
;
readLen
=
0
;
/* restore original position */
/* restore original position */
SetFilePointer
(
h
->
fd
,
origOffsetLo
,
&
origOffsetHi
,
FILE_BEGIN
);
SetFilePointer
Ex
(
h
->
fd
,
old_pos
,
NULL
,
FILE_BEGIN
);
}
}
CHM_RELEASE_LOCK
(
h
->
mutex
);
CHM_RELEASE_LOCK
(
h
->
mutex
);
return
readLen
;
return
readLen
;
...
@@ -616,7 +615,7 @@ struct chmFile *chm_openW(const WCHAR *filename)
...
@@ -616,7 +615,7 @@ struct chmFile *chm_openW(const WCHAR *filename)
struct
chmLzxcControlData
ctlData
;
struct
chmLzxcControlData
ctlData
;
/* allocate handle */
/* allocate handle */
newHandle
=
(
struct
chmFile
*
)
malloc
(
sizeof
(
struct
chmFile
));
newHandle
=
malloc
(
sizeof
(
struct
chmFile
));
newHandle
->
fd
=
CHM_NULL_FD
;
newHandle
->
fd
=
CHM_NULL_FD
;
newHandle
->
lzx_state
=
NULL
;
newHandle
->
lzx_state
=
NULL
;
newHandle
->
cache_blocks
=
NULL
;
newHandle
->
cache_blocks
=
NULL
;
...
@@ -834,12 +833,12 @@ void chm_set_param(struct chmFile *h,
...
@@ -834,12 +833,12 @@ void chm_set_param(struct chmFile *h,
if
(
paramVal
!=
h
->
cache_num_blocks
)
if
(
paramVal
!=
h
->
cache_num_blocks
)
{
{
UChar
**
newBlocks
;
UChar
**
newBlocks
;
U
Int64
*
newIndices
;
Int64
*
newIndices
;
int
i
;
int
i
;
/* allocate new cached blocks */
/* allocate new cached blocks */
newBlocks
=
(
UChar
**
)
malloc
(
paramVal
*
sizeof
(
UChar
*
));
newBlocks
=
malloc
(
paramVal
*
sizeof
(
UChar
*
));
newIndices
=
(
UInt64
*
)
malloc
(
paramVal
*
sizeof
(
UInt64
));
newIndices
=
malloc
(
paramVal
*
sizeof
(
UInt64
));
for
(
i
=
0
;
i
<
paramVal
;
i
++
)
for
(
i
=
0
;
i
<
paramVal
;
i
++
)
{
{
newBlocks
[
i
]
=
NULL
;
newBlocks
[
i
]
=
NULL
;
...
@@ -1212,8 +1211,7 @@ static Int64 _chm_decompress_block(struct chmFile *h,
...
@@ -1212,8 +1211,7 @@ static Int64 _chm_decompress_block(struct chmFile *h,
indexSlot
=
(
int
)((
curBlockIdx
)
%
h
->
cache_num_blocks
);
indexSlot
=
(
int
)((
curBlockIdx
)
%
h
->
cache_num_blocks
);
h
->
cache_block_indices
[
indexSlot
]
=
curBlockIdx
;
h
->
cache_block_indices
[
indexSlot
]
=
curBlockIdx
;
if
(
!
h
->
cache_blocks
[
indexSlot
])
if
(
!
h
->
cache_blocks
[
indexSlot
])
h
->
cache_blocks
[
indexSlot
]
=
(
UChar
*
)
malloc
(
h
->
cache_blocks
[
indexSlot
]
=
malloc
(
(
unsigned
int
)(
h
->
reset_table
.
block_len
));
(
unsigned
int
)(
h
->
reset_table
.
block_len
));
lbuffer
=
h
->
cache_blocks
[
indexSlot
];
lbuffer
=
h
->
cache_blocks
[
indexSlot
];
/* decompress the previous block */
/* decompress the previous block */
...
@@ -1251,8 +1249,7 @@ static Int64 _chm_decompress_block(struct chmFile *h,
...
@@ -1251,8 +1249,7 @@ static Int64 _chm_decompress_block(struct chmFile *h,
indexSlot
=
(
int
)(
block
%
h
->
cache_num_blocks
);
indexSlot
=
(
int
)(
block
%
h
->
cache_num_blocks
);
h
->
cache_block_indices
[
indexSlot
]
=
block
;
h
->
cache_block_indices
[
indexSlot
]
=
block
;
if
(
!
h
->
cache_blocks
[
indexSlot
])
if
(
!
h
->
cache_blocks
[
indexSlot
])
h
->
cache_blocks
[
indexSlot
]
=
(
UChar
*
)
malloc
(
h
->
cache_blocks
[
indexSlot
]
=
malloc
(
((
unsigned
int
)
h
->
reset_table
.
block_len
));
((
unsigned
int
)
h
->
reset_table
.
block_len
));
lbuffer
=
h
->
cache_blocks
[
indexSlot
];
lbuffer
=
h
->
cache_blocks
[
indexSlot
];
*
ubuffer
=
lbuffer
;
*
ubuffer
=
lbuffer
;
...
...
dlls/itss/lzx.c
View file @
a107234d
...
@@ -169,8 +169,8 @@ struct LZXstate *LZXinit(int window)
...
@@ -169,8 +169,8 @@ struct LZXstate *LZXinit(int window)
if
(
window
<
15
||
window
>
21
)
return
NULL
;
if
(
window
<
15
||
window
>
21
)
return
NULL
;
/* allocate state and associated window */
/* allocate state and associated window */
pState
=
(
struct
LZXstate
*
)
malloc
(
sizeof
(
struct
LZXstate
));
pState
=
malloc
(
sizeof
(
struct
LZXstate
));
if
(
!
(
pState
->
window
=
(
UBYTE
*
)
malloc
(
wndsize
)))
if
(
!
(
pState
->
window
=
malloc
(
wndsize
)))
{
{
free
(
pState
);
free
(
pState
);
return
NULL
;
return
NULL
;
...
...
dlls/netapi32/nbnamecache.c
View file @
a107234d
...
@@ -122,7 +122,7 @@ BOOL NBNameCacheAddEntry(struct NBNameCache *cache, NBNameCacheEntry *entry)
...
@@ -122,7 +122,7 @@ BOOL NBNameCacheAddEntry(struct NBNameCache *cache, NBNameCacheEntry *entry)
NBNameCacheNode
**
node
;
NBNameCacheNode
**
node
;
EnterCriticalSection
(
&
cache
->
cs
);
EnterCriticalSection
(
&
cache
->
cs
);
node
=
NBNameCacheWalk
(
cache
,
entry
->
name
);
node
=
NBNameCacheWalk
(
cache
,
(
char
*
)
entry
->
name
);
if
(
node
)
if
(
node
)
{
{
(
*
node
)
->
expireTime
=
GetTickCount
()
+
(
*
node
)
->
expireTime
=
GetTickCount
()
+
...
@@ -166,7 +166,7 @@ const NBNameCacheEntry *NBNameCacheFindEntry(struct NBNameCache *cache,
...
@@ -166,7 +166,7 @@ const NBNameCacheEntry *NBNameCacheFindEntry(struct NBNameCache *cache,
NBNameCacheNode
**
node
;
NBNameCacheNode
**
node
;
EnterCriticalSection
(
&
cache
->
cs
);
EnterCriticalSection
(
&
cache
->
cs
);
node
=
NBNameCacheWalk
(
cache
,
name
);
node
=
NBNameCacheWalk
(
cache
,
(
char
*
)
name
);
if
(
node
)
if
(
node
)
ret
=
(
*
node
)
->
entry
;
ret
=
(
*
node
)
->
entry
;
else
else
...
@@ -188,7 +188,7 @@ BOOL NBNameCacheUpdateNBName(struct NBNameCache *cache,
...
@@ -188,7 +188,7 @@ BOOL NBNameCacheUpdateNBName(struct NBNameCache *cache,
NBNameCacheNode
**
node
;
NBNameCacheNode
**
node
;
EnterCriticalSection
(
&
cache
->
cs
);
EnterCriticalSection
(
&
cache
->
cs
);
node
=
NBNameCacheWalk
(
cache
,
name
);
node
=
NBNameCacheWalk
(
cache
,
(
char
*
)
name
);
if
(
node
&&
*
node
&&
(
*
node
)
->
entry
)
if
(
node
&&
*
node
&&
(
*
node
)
->
entry
)
{
{
memcpy
((
*
node
)
->
entry
->
nbname
,
nbname
,
NCBNAMSZ
);
memcpy
((
*
node
)
->
entry
->
nbname
,
nbname
,
NCBNAMSZ
);
...
...
dlls/netapi32/nbt.c
View file @
a107234d
...
@@ -244,7 +244,7 @@ static int NetBTSendNameQuery(SOCKET fd, const UCHAR name[NCBNAMSZ], WORD xid,
...
@@ -244,7 +244,7 @@ static int NetBTSendNameQuery(SOCKET fd, const UCHAR name[NCBNAMSZ], WORD xid,
TRACE
(
"name %s, dest addr %s
\n
"
,
name
,
inet_ntoa
(
addr
));
TRACE
(
"name %s, dest addr %s
\n
"
,
name
,
inet_ntoa
(
addr
));
if
(
broadcast
)
if
(
broadcast
)
ret
=
setsockopt
(
fd
,
SOL_SOCKET
,
SO_BROADCAST
,
(
PUCHAR
)
&
on
,
sizeof
(
on
));
ret
=
setsockopt
(
fd
,
SOL_SOCKET
,
SO_BROADCAST
,
(
const
char
*
)
&
on
,
sizeof
(
on
));
if
(
ret
==
0
)
if
(
ret
==
0
)
{
{
WSABUF
wsaBuf
;
WSABUF
wsaBuf
;
...
@@ -256,7 +256,7 @@ static int NetBTSendNameQuery(SOCKET fd, const UCHAR name[NCBNAMSZ], WORD xid,
...
@@ -256,7 +256,7 @@ static int NetBTSendNameQuery(SOCKET fd, const UCHAR name[NCBNAMSZ], WORD xid,
sin
.
sin_family
=
AF_INET
;
sin
.
sin_family
=
AF_INET
;
sin
.
sin_port
=
htons
(
PORT_NBNS
);
sin
.
sin_port
=
htons
(
PORT_NBNS
);
wsaBuf
.
buf
=
buf
;
wsaBuf
.
buf
=
(
CHAR
*
)
buf
;
wsaBuf
.
len
=
NetBTNameReq
(
name
,
xid
,
qtype
,
broadcast
,
buf
,
wsaBuf
.
len
=
NetBTNameReq
(
name
,
xid
,
qtype
,
broadcast
,
buf
,
sizeof
(
buf
));
sizeof
(
buf
));
if
(
wsaBuf
.
len
>
0
)
if
(
wsaBuf
.
len
>
0
)
...
@@ -318,7 +318,7 @@ static UCHAR NetBTWaitForNameResponse(NetBTAdapter *adapter, SOCKET fd,
...
@@ -318,7 +318,7 @@ static UCHAR NetBTWaitForNameResponse(NetBTAdapter *adapter, SOCKET fd,
int
fromsize
;
int
fromsize
;
struct
sockaddr_in
fromaddr
;
struct
sockaddr_in
fromaddr
;
WORD
respXID
,
flags
,
queryCount
,
answerCount
;
WORD
respXID
,
flags
,
queryCount
,
answerCount
;
WSABUF
wsaBuf
=
{
sizeof
(
buffer
),
buffer
};
WSABUF
wsaBuf
=
{
sizeof
(
buffer
),
(
CHAR
*
)
buffer
};
DWORD
bytesReceived
,
recvFlags
=
0
;
DWORD
bytesReceived
,
recvFlags
=
0
;
fromsize
=
sizeof
(
fromaddr
);
fromsize
=
sizeof
(
fromaddr
);
...
@@ -533,7 +533,7 @@ static UCHAR NetBTinetResolve(const UCHAR name[NCBNAMSZ],
...
@@ -533,7 +533,7 @@ static UCHAR NetBTinetResolve(const UCHAR name[NCBNAMSZ],
if
(
isalnum
(
name
[
0
])
&&
(
name
[
NCBNAMSZ
-
1
]
==
0
||
if
(
isalnum
(
name
[
0
])
&&
(
name
[
NCBNAMSZ
-
1
]
==
0
||
name
[
NCBNAMSZ
-
1
]
==
0x20
))
name
[
NCBNAMSZ
-
1
]
==
0x20
))
{
{
U
CHAR
toLookup
[
NCBNAMSZ
];
CHAR
toLookup
[
NCBNAMSZ
];
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
NCBNAMSZ
-
1
&&
name
[
i
]
&&
name
[
i
]
!=
' '
;
i
++
)
for
(
i
=
0
;
i
<
NCBNAMSZ
-
1
&&
name
[
i
]
&&
name
[
i
]
!=
' '
;
i
++
)
...
@@ -929,7 +929,7 @@ static UCHAR NetBTSessionReq(SOCKET fd, const UCHAR *calledName,
...
@@ -929,7 +929,7 @@ static UCHAR NetBTSessionReq(SOCKET fd, const UCHAR *calledName,
NBR_ADDWORD
(
&
buffer
[
2
],
len
);
NBR_ADDWORD
(
&
buffer
[
2
],
len
);
wsaBuf
.
len
=
len
+
NBSS_HDRSIZE
;
wsaBuf
.
len
=
len
+
NBSS_HDRSIZE
;
wsaBuf
.
buf
=
buffer
;
wsaBuf
.
buf
=
(
char
*
)
buffer
;
r
=
WSASend
(
fd
,
&
wsaBuf
,
1
,
&
bytesSent
,
0
,
NULL
,
NULL
);
r
=
WSASend
(
fd
,
&
wsaBuf
,
1
,
&
bytesSent
,
0
,
NULL
,
NULL
);
if
(
r
<
0
||
bytesSent
<
len
+
NBSS_HDRSIZE
)
if
(
r
<
0
||
bytesSent
<
len
+
NBSS_HDRSIZE
)
...
@@ -1005,13 +1005,13 @@ static UCHAR NetBTCall(void *adapt, PNCB ncb, void **sess)
...
@@ -1005,13 +1005,13 @@ static UCHAR NetBTCall(void *adapt, PNCB ncb, void **sess)
if
(
ncb
->
ncb_rto
>
0
)
if
(
ncb
->
ncb_rto
>
0
)
{
{
timeout
=
ncb
->
ncb_rto
*
500
;
timeout
=
ncb
->
ncb_rto
*
500
;
setsockopt
(
fd
,
SOL_SOCKET
,
SO_RCVTIMEO
,
(
PUCHAR
)
&
timeout
,
setsockopt
(
fd
,
SOL_SOCKET
,
SO_RCVTIMEO
,
(
char
*
)
&
timeout
,
sizeof
(
timeout
));
sizeof
(
timeout
));
}
}
if
(
ncb
->
ncb_rto
>
0
)
if
(
ncb
->
ncb_rto
>
0
)
{
{
timeout
=
ncb
->
ncb_sto
*
500
;
timeout
=
ncb
->
ncb_sto
*
500
;
setsockopt
(
fd
,
SOL_SOCKET
,
SO_SNDTIMEO
,
(
PUCHAR
)
&
timeout
,
setsockopt
(
fd
,
SOL_SOCKET
,
SO_SNDTIMEO
,
(
char
*
)
&
timeout
,
sizeof
(
timeout
));
sizeof
(
timeout
));
}
}
...
@@ -1098,9 +1098,9 @@ static UCHAR NetBTSend(void *adapt, void *sess, PNCB ncb)
...
@@ -1098,9 +1098,9 @@ static UCHAR NetBTSend(void *adapt, void *sess, PNCB ncb)
NBR_ADDWORD
(
&
buffer
[
2
],
ncb
->
ncb_length
);
NBR_ADDWORD
(
&
buffer
[
2
],
ncb
->
ncb_length
);
wsaBufs
[
0
].
len
=
NBSS_HDRSIZE
;
wsaBufs
[
0
].
len
=
NBSS_HDRSIZE
;
wsaBufs
[
0
].
buf
=
buffer
;
wsaBufs
[
0
].
buf
=
(
char
*
)
buffer
;
wsaBufs
[
1
].
len
=
ncb
->
ncb_length
;
wsaBufs
[
1
].
len
=
ncb
->
ncb_length
;
wsaBufs
[
1
].
buf
=
ncb
->
ncb_buffer
;
wsaBufs
[
1
].
buf
=
(
char
*
)
ncb
->
ncb_buffer
;
r
=
WSASend
(
session
->
fd
,
wsaBufs
,
sizeof
(
wsaBufs
)
/
sizeof
(
wsaBufs
[
0
]),
r
=
WSASend
(
session
->
fd
,
wsaBufs
,
sizeof
(
wsaBufs
)
/
sizeof
(
wsaBufs
[
0
]),
&
bytesSent
,
0
,
NULL
,
NULL
);
&
bytesSent
,
0
,
NULL
,
NULL
);
...
@@ -1148,10 +1148,10 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb)
...
@@ -1148,10 +1148,10 @@ static UCHAR NetBTRecv(void *adapt, void *sess, PNCB ncb)
{
{
bufferCount
++
;
bufferCount
++
;
wsaBufs
[
0
].
len
=
NBSS_HDRSIZE
;
wsaBufs
[
0
].
len
=
NBSS_HDRSIZE
;
wsaBufs
[
0
].
buf
=
buffer
;
wsaBufs
[
0
].
buf
=
(
char
*
)
buffer
;
}
}
wsaBufs
[
bufferCount
].
len
=
ncb
->
ncb_length
;
wsaBufs
[
bufferCount
].
len
=
ncb
->
ncb_length
;
wsaBufs
[
bufferCount
].
buf
=
ncb
->
ncb_buffer
;
wsaBufs
[
bufferCount
].
buf
=
(
char
*
)
ncb
->
ncb_buffer
;
bufferCount
++
;
bufferCount
++
;
flags
=
0
;
flags
=
0
;
...
...
dlls/odbc32/proxyodbc.c
View file @
a107234d
...
@@ -200,12 +200,12 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
...
@@ -200,12 +200,12 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
{
{
SQLRETURN
sql_ret
;
SQLRETURN
sql_ret
;
SQLUSMALLINT
dirn
;
SQLUSMALLINT
dirn
;
SQL
CHAR
desc
[
256
];
CHAR
desc
[
256
];
SQLSMALLINT
sizedesc
;
SQLSMALLINT
sizedesc
;
success
=
1
;
success
=
1
;
dirn
=
SQL_FETCH_FIRST
;
dirn
=
SQL_FETCH_FIRST
;
while
((
sql_ret
=
SQLDrivers
(
hEnv
,
dirn
,
desc
,
sizeof
(
desc
),
while
((
sql_ret
=
SQLDrivers
(
hEnv
,
dirn
,
(
SQLCHAR
*
)
desc
,
sizeof
(
desc
),
&
sizedesc
,
NULL
,
0
,
NULL
))
==
SQL_SUCCESS
||
&
sizedesc
,
NULL
,
0
,
NULL
))
==
SQL_SUCCESS
||
sql_ret
==
SQL_SUCCESS_WITH_INFO
)
sql_ret
==
SQL_SUCCESS_WITH_INFO
)
{
{
...
@@ -218,7 +218,7 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
...
@@ -218,7 +218,7 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
NULL
,
NULL
,
NULL
))
==
ERROR_FILE_NOT_FOUND
)
NULL
,
NULL
,
NULL
))
==
ERROR_FILE_NOT_FOUND
)
{
{
if
((
reg_ret
=
RegSetValueExA
(
hDrivers
,
desc
,
0
,
if
((
reg_ret
=
RegSetValueExA
(
hDrivers
,
desc
,
0
,
REG_SZ
,
"Installed"
,
10
))
!=
ERROR_SUCCESS
)
REG_SZ
,
(
LPBYTE
)
"Installed"
,
10
))
!=
ERROR_SUCCESS
)
{
{
TRACE
(
"Error %ld replicating driver %s
\n
"
,
TRACE
(
"Error %ld replicating driver %s
\n
"
,
reg_ret
,
desc
);
reg_ret
,
desc
);
...
@@ -316,9 +316,9 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
...
@@ -316,9 +316,9 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
LONG
reg_ret
;
LONG
reg_ret
;
SQLRETURN
sql_ret
;
SQLRETURN
sql_ret
;
SQLUSMALLINT
dirn
;
SQLUSMALLINT
dirn
;
SQL
CHAR
dsn
[
SQL_MAX_DSN_LENGTH
+
1
];
CHAR
dsn
[
SQL_MAX_DSN_LENGTH
+
1
];
SQLSMALLINT
sizedsn
;
SQLSMALLINT
sizedsn
;
SQL
CHAR
desc
[
256
];
CHAR
desc
[
256
];
SQLSMALLINT
sizedesc
;
SQLSMALLINT
sizedesc
;
int
success
;
int
success
;
const
char
*
which
=
is_user
?
"user"
:
"system"
;
const
char
*
which
=
is_user
?
"user"
:
"system"
;
...
@@ -333,8 +333,8 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
...
@@ -333,8 +333,8 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
success
=
1
;
success
=
1
;
dirn
=
is_user
?
SQL_FETCH_FIRST_USER
:
SQL_FETCH_FIRST_SYSTEM
;
dirn
=
is_user
?
SQL_FETCH_FIRST_USER
:
SQL_FETCH_FIRST_SYSTEM
;
while
((
sql_ret
=
SQLDataSources
(
hEnv
,
dirn
,
while
((
sql_ret
=
SQLDataSources
(
hEnv
,
dirn
,
dsn
,
sizeof
(
dsn
),
&
sizedsn
,
(
SQLCHAR
*
)
dsn
,
sizeof
(
dsn
),
&
sizedsn
,
desc
,
sizeof
(
desc
),
&
sizedesc
))
==
SQL_SUCCESS
(
SQLCHAR
*
)
desc
,
sizeof
(
desc
),
&
sizedesc
))
==
SQL_SUCCESS
||
sql_ret
==
SQL_SUCCESS_WITH_INFO
)
||
sql_ret
==
SQL_SUCCESS_WITH_INFO
)
{
{
/* FIXME Do some proper handling of the SUCCESS_WITH_INFO */
/* FIXME Do some proper handling of the SUCCESS_WITH_INFO */
...
@@ -353,7 +353,7 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
...
@@ -353,7 +353,7 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
==
ERROR_FILE_NOT_FOUND
)
==
ERROR_FILE_NOT_FOUND
)
{
{
if
((
reg_ret
=
RegSetValueExA
(
hDSN
,
DRIVERKEY
,
0
,
if
((
reg_ret
=
RegSetValueExA
(
hDSN
,
DRIVERKEY
,
0
,
REG_SZ
,
desc
,
sizedesc
))
!=
ERROR_SUCCESS
)
REG_SZ
,
(
LPBYTE
)
desc
,
sizedesc
))
!=
ERROR_SUCCESS
)
{
{
TRACE
(
"Error %ld replicating description of "
TRACE
(
"Error %ld replicating description of "
"%s(%s)
\n
"
,
reg_ret
,
dsn
,
desc
);
"%s(%s)
\n
"
,
reg_ret
,
dsn
,
desc
);
...
@@ -862,8 +862,8 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
...
@@ -862,8 +862,8 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
CHECK_READY_AND_dmHandle
();
CHECK_READY_AND_dmHandle
();
strcpy
(
gProxyHandle
.
ServerName
,
ServerName
);
strcpy
(
(
LPSTR
)
gProxyHandle
.
ServerName
,
(
LPSTR
)
ServerName
);
strcpy
(
gProxyHandle
.
UserName
,
UserName
);
strcpy
(
(
LPSTR
)
gProxyHandle
.
UserName
,
(
LPSTR
)
UserName
);
assert
(
gProxyHandle
.
functions
[
SQLAPI_INDEX_SQLCONNECT
].
func
);
assert
(
gProxyHandle
.
functions
[
SQLAPI_INDEX_SQLCONNECT
].
func
);
ret
=
(
gProxyHandle
.
functions
[
SQLAPI_INDEX_SQLCONNECT
].
func
)
ret
=
(
gProxyHandle
.
functions
[
SQLAPI_INDEX_SQLCONNECT
].
func
)
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
a107234d
...
@@ -821,7 +821,7 @@ static void test_import_private(void)
...
@@ -821,7 +821,7 @@ static void test_import_private(void)
dwLen
=
(
DWORD
)
sizeof
(
abEncryptedMessage
);
dwLen
=
(
DWORD
)
sizeof
(
abEncryptedMessage
);
result
=
CryptDecrypt
(
hSessionKey
,
0
,
TRUE
,
0
,
abEncryptedMessage
,
&
dwLen
);
result
=
CryptDecrypt
(
hSessionKey
,
0
,
TRUE
,
0
,
abEncryptedMessage
,
&
dwLen
);
ok
(
result
&&
dwLen
==
12
&&
!
strcmp
(
abEncryptedMessage
,
"Wine rocks!"
),
ok
(
result
&&
dwLen
==
12
&&
!
memcmp
(
abEncryptedMessage
,
"Wine rocks!"
,
12
),
"%08lx, len: %ld
\n
"
,
GetLastError
(),
dwLen
);
"%08lx, len: %ld
\n
"
,
GetLastError
(),
dwLen
);
if
(
!
derive_key
(
CALG_RC4
,
&
hSessionKey
,
56
))
return
;
if
(
!
derive_key
(
CALG_RC4
,
&
hSessionKey
,
56
))
return
;
...
@@ -1390,7 +1390,7 @@ static void test_enum_container(void)
...
@@ -1390,7 +1390,7 @@ static void test_enum_container(void)
/* We only check, if the currently open 'winetest' container is among the enumerated. */
/* We only check, if the currently open 'winetest' container is among the enumerated. */
do
{
do
{
if
(
!
strcmp
(
abContainerName
,
"winetest"
))
fFound
=
TRUE
;
if
(
!
strcmp
(
(
const
char
*
)
abContainerName
,
"winetest"
))
fFound
=
TRUE
;
dwBufferLen
=
(
DWORD
)
sizeof
(
abContainerName
);
dwBufferLen
=
(
DWORD
)
sizeof
(
abContainerName
);
}
while
(
CryptGetProvParam
(
hProv
,
PP_ENUMCONTAINERS
,
abContainerName
,
&
dwBufferLen
,
0
));
}
while
(
CryptGetProvParam
(
hProv
,
PP_ENUMCONTAINERS
,
abContainerName
,
&
dwBufferLen
,
0
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment