Skip to content

Commit 152c016

Browse files
committed
C++: Fix formatting.
1 parent 9504592 commit 152c016

File tree

2 files changed

+243
-243
lines changed

2 files changed

+243
-243
lines changed
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
<!DOCTYPE qhelp PUBLIC
2-
"-//Semmle//qhelp//EN"
3-
"qhelp.dtd">
4-
<qhelp>
5-
<overview>
6-
<p>Different overloads of the <code>new</code> operator handle allocation failures in different ways.
7-
If <code>new T</code> fails for some type <code>T</code>, it throws a <code>std::bad_alloc</code> exception,
8-
but <code>new(std::nothrow) T</code> returns a null pointer. If the programmer does not use the corresponding
9-
method of error handling, allocation failure may go unhandled and could cause the program to behave in
10-
unexpected ways.</p>
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
<overview>
6+
<p>Different overloads of the <code>new</code> operator handle allocation failures in different ways.
7+
If <code>new T</code> fails for some type <code>T</code>, it throws a <code>std::bad_alloc</code> exception,
8+
but <code>new(std::nothrow) T</code> returns a null pointer. If the programmer does not use the corresponding
9+
method of error handling, allocation failure may go unhandled and could cause the program to behave in
10+
unexpected ways.</p>
1111

12-
</overview>
13-
<recommendation>
12+
</overview>
13+
<recommendation>
1414

15-
<p>Make sure that exceptions are handled appropriately if <code>new T</code> is used. On the other hand,
16-
make sure to handle the possibility of null pointers if <code>new(std::nothrow) T</code> is used.</p>
15+
<p>Make sure that exceptions are handled appropriately if <code>new T</code> is used. On the other hand,
16+
make sure to handle the possibility of null pointers if <code>new(std::nothrow) T</code> is used.</p>
1717

18-
</recommendation>
19-
<example>
20-
<sample src="IncorrectAllocationErrorHandling.cpp" />
18+
</recommendation>
19+
<example>
20+
<sample src="IncorrectAllocationErrorHandling.cpp" />
2121

22-
</example>
23-
<references>
22+
</example>
23+
<references>
2424

25-
<li>
26-
CERT C++ Coding Standard:
27-
<a href="https://wiki.sei.cmu.edu/confluence/display/cplusplus/MEM52-CPP.+Detect+and+handle+memory+allocation+errors">MEM52-CPP. Detect and handle memory allocation errors</a>.
28-
</li>
25+
<li>
26+
CERT C++ Coding Standard:
27+
<a href="https://wiki.sei.cmu.edu/confluence/display/cplusplus/MEM52-CPP.+Detect+and+handle+memory+allocation+errors">MEM52-CPP. Detect and handle memory allocation errors</a>.
28+
</li>
2929

30-
</references>
31-
</qhelp>
30+
</references>
31+
</qhelp>

0 commit comments

Comments
 (0)