Skip to content

Commit d813cb6

Browse files
committed
C++: Upper-case Boolean and <code> around HRESULT
1 parent a93939b commit d813cb6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.qhelp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<qhelp>
55

66
<overview>
7-
<p>This query indicates that an <code>HRESULT</code> is being cast to a boolean type or vice versa.</p>
8-
<p>The typical success value (<code>S_OK</code>) of an <code>HRESULT</code> equals 0. However, 0 indicates failure for a boolean type.</p>
9-
<p>Casting an <code>HRESULT</code> to a boolean type and then using it in a test expression will yield an incorrect result.</p>
7+
<p>This query indicates that an <code>HRESULT</code> is being cast to a Boolean type or vice versa.</p>
8+
<p>The typical success value (<code>S_OK</code>) of an <code>HRESULT</code> equals 0. However, 0 indicates failure for a Boolean type.</p>
9+
<p>Casting an <code>HRESULT</code> to a Boolean type and then using it in a test expression will yield an incorrect result.</p>
1010
</overview>
1111

1212
<recommendation>
13-
<p>To check if a call that returns an HRESULT succeeded use the <code>FAILED</code> macro.</p>
13+
<p>To check if a call that returns an <code>HRESULT</code> succeeded use the <code>FAILED</code> macro.</p>
1414
</recommendation>
1515

1616
<example>

0 commit comments

Comments
 (0)