Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2793be9c
Commit
2793be9c
authored
Aug 06, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Avoid TRUE:FALSE conditional expressions.
parent
fdfb8658
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
+13
-14
base64.c
dlls/crypt32/base64.c
+2
-2
decode.c
dlls/crypt32/decode.c
+1
-1
message.c
dlls/crypt32/message.c
+4
-5
oid.c
dlls/crypt32/oid.c
+3
-3
store.c
dlls/crypt32/store.c
+3
-3
No files found.
dlls/crypt32/base64.c
View file @
2793be9c
...
...
@@ -827,7 +827,7 @@ BOOL WINAPI CryptStringToBinaryA(LPCSTR pszString,
ret
=
decoder
(
pszString
,
cchString
,
pbBinary
,
pcbBinary
,
pdwSkip
,
pdwFlags
);
if
(
ret
)
SetLastError
(
ret
);
return
(
ret
==
ERROR_SUCCESS
)
?
TRUE
:
FALSE
;
return
ret
==
ERROR_SUCCESS
;
}
static
LONG
decodeBase64BlockW
(
const
WCHAR
*
in_buf
,
int
in_len
,
...
...
@@ -1159,5 +1159,5 @@ BOOL WINAPI CryptStringToBinaryW(LPCWSTR pszString,
ret
=
decoder
(
pszString
,
cchString
,
pbBinary
,
pcbBinary
,
pdwSkip
,
pdwFlags
);
if
(
ret
)
SetLastError
(
ret
);
return
(
ret
==
ERROR_SUCCESS
)
?
TRUE
:
FALSE
;
return
ret
==
ERROR_SUCCESS
;
}
dlls/crypt32/decode.c
View file @
2793be9c
...
...
@@ -2977,7 +2977,7 @@ static BOOL CRYPT_AsnDecodeBool(const BYTE *pbEncoded, DWORD cbEncoded,
else
{
*
pcbStructInfo
=
sizeof
(
BOOL
);
*
(
BOOL
*
)
pvStructInfo
=
pbEncoded
[
2
]
?
TRUE
:
FALSE
;
*
(
BOOL
*
)
pvStructInfo
=
pbEncoded
[
2
]
!=
0
;
ret
=
TRUE
;
}
TRACE
(
"returning %d (%08x)
\n
"
,
ret
,
GetLastError
());
...
...
dlls/crypt32/message.c
View file @
2793be9c
...
...
@@ -140,7 +140,7 @@ BOOL WINAPI CryptVerifyDetachedMessageSignature(
for
(
i
=
0
;
ret
&&
i
<
cToBeSigned
;
i
++
)
ret
=
CryptMsgUpdate
(
msg
,
rgpbToBeSigned
[
i
],
rgcbToBeSigned
[
i
],
i
==
cToBeSigned
-
1
?
TRUE
:
FALSE
);
i
==
cToBeSigned
-
1
);
}
if
(
ret
)
{
...
...
@@ -304,8 +304,7 @@ BOOL WINAPI CryptHashMessage(PCRYPT_HASH_MESSAGE_PARA pHashPara,
if
(
msg
)
{
for
(
i
=
0
,
ret
=
TRUE
;
ret
&&
i
<
cToBeHashed
;
i
++
)
ret
=
CryptMsgUpdate
(
msg
,
rgpbToBeHashed
[
i
],
rgcbToBeHashed
[
i
],
i
==
cToBeHashed
-
1
?
TRUE
:
FALSE
);
ret
=
CryptMsgUpdate
(
msg
,
rgpbToBeHashed
[
i
],
rgcbToBeHashed
[
i
],
i
==
cToBeHashed
-
1
);
if
(
ret
)
{
ret
=
CryptMsgGetParam
(
msg
,
CMSG_CONTENT_PARAM
,
0
,
pbHashedBlob
,
...
...
@@ -356,7 +355,7 @@ BOOL WINAPI CryptVerifyDetachedMessageHash(PCRYPT_HASH_MESSAGE_PARA pHashPara,
for
(
i
=
0
;
ret
&&
i
<
cToBeHashed
;
i
++
)
{
ret
=
CryptMsgUpdate
(
msg
,
rgpbToBeHashed
[
i
],
rgcbToBeHashed
[
i
],
i
==
cToBeHashed
-
1
?
TRUE
:
FALSE
);
rgcbToBeHashed
[
i
],
i
==
cToBeHashed
-
1
);
}
}
else
...
...
@@ -511,7 +510,7 @@ BOOL WINAPI CryptSignMessage(PCRYPT_SIGN_MESSAGE_PARA pSignPara,
for
(
i
=
0
;
ret
&&
i
<
cToBeSigned
;
++
i
)
{
ret
=
CryptMsgUpdate
(
msg
,
rgpbToBeSigned
[
i
],
rgcbToBeSigned
[
i
],
i
==
cToBeSigned
-
1
?
TRUE
:
FALSE
);
i
==
cToBeSigned
-
1
);
}
}
else
...
...
dlls/crypt32/oid.c
View file @
2793be9c
...
...
@@ -684,7 +684,7 @@ BOOL WINAPI CryptUnregisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName,
CryptMemFree
(
szKey
);
if
(
rc
)
SetLastError
(
rc
);
return
rc
?
FALSE
:
TRUE
;
return
!
rc
;
}
BOOL
WINAPI
CryptGetOIDFunctionValue
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
...
...
@@ -721,7 +721,7 @@ BOOL WINAPI CryptGetOIDFunctionValue(DWORD dwEncodingType, LPCSTR pszFuncName,
SetLastError
(
rc
);
RegCloseKey
(
hKey
);
}
return
rc
?
FALSE
:
TRUE
;
return
!
rc
;
}
BOOL
WINAPI
CryptSetOIDFunctionValue
(
DWORD
dwEncodingType
,
LPCSTR
pszFuncName
,
...
...
@@ -758,7 +758,7 @@ BOOL WINAPI CryptSetOIDFunctionValue(DWORD dwEncodingType, LPCSTR pszFuncName,
SetLastError
(
rc
);
RegCloseKey
(
hKey
);
}
return
rc
?
FALSE
:
TRUE
;
return
!
rc
;
}
static
LPCWSTR
CRYPT_FindStringInMultiString
(
LPCWSTR
multi
,
LPCWSTR
toFind
)
...
...
dlls/crypt32/store.c
View file @
2793be9c
...
...
@@ -163,7 +163,7 @@ static BOOL CRYPT_MemAddCert(PWINECRYPT_CERTSTORE store, void *cert,
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCertificateContext
(
context
);
}
return
context
?
TRUE
:
FALSE
;
return
context
!=
0
;
}
static
void
*
CRYPT_MemEnumCert
(
PWINECRYPT_CERTSTORE
store
,
void
*
pPrev
)
...
...
@@ -208,7 +208,7 @@ static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl,
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCRLContext
(
context
);
}
return
context
?
TRUE
:
FALSE
;
return
context
!=
0
;
}
static
void
*
CRYPT_MemEnumCrl
(
PWINECRYPT_CERTSTORE
store
,
void
*
pPrev
)
...
...
@@ -253,7 +253,7 @@ static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl,
if
(
ppStoreContext
)
*
ppStoreContext
=
CertDuplicateCTLContext
(
context
);
}
return
context
?
TRUE
:
FALSE
;
return
context
!=
0
;
}
static
void
*
CRYPT_MemEnumCtl
(
PWINECRYPT_CERTSTORE
store
,
void
*
pPrev
)
...
...
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