[PATCH] crypt32: Do not use an empty body in an else-statement as documentation.
Michael Stefaniuc
mstefani at redhat.de
Mon Dec 10 04:47:36 CST 2007
gcc -Wextra complains about that:
dlls/crypt32/chain.c:527: warning: empty body in an else-statement
dlls/crypt32/chain.c:554: warning: empty body in an else-statement
An alternative would be to use an empty block:
else
{
/* name is too short, no match */
}
return match;
Putting the "else" into the comment is shorter though.
bye
michael
---
dlls/crypt32/chain.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 5724541..65ca674 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -523,8 +523,8 @@ static BOOL dns_name_matches(LPCWSTR constraint, LPCWSTR name,
else if (lstrlenW(name) >= lstrlenW(constraint))
match = !lstrcmpiW(name + lstrlenW(name) - lstrlenW(constraint),
constraint);
- else
- ; /* name is too short, no match */
+ /* else: name is too short, no match */
+
return match;
}
@@ -550,8 +550,8 @@ static BOOL ip_address_matches(const CRYPT_DATA_BLOB *constraint,
*/
match = (subnet & mask) == (addr & mask);
}
- else
- ; /* name is wrong size, no match */
+ /* else: name is wrong size, no match */
+
return match;
}
--
1.5.3.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071210/2cc2ea68/attachment.pgp
More information about the wine-patches
mailing list