Skip to content

Commit e01d712

Browse files
authored
Merge pull request github#5958 from github/igfoo/ReturnValueIgnored
C++: Update the ReturnValueIgnored.qhelp docs to match the code
2 parents 795a1c7 + f9ede97 commit e01d712

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpp/ql/src/Critical/ReturnValueIgnored.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<overview>
88
<p>
99
This rule finds calls to a function that ignore the return value. A function call is only marked
10-
as a violation if at least 80% of the total calls to that function check the return value. Not
10+
as a violation if at least 90% of the total calls to that function check the return value. Not
1111
checking a return value is a common source of defects from standard library functions like <code>malloc</code> or <code>fread</code>.
1212
These functions return the status information and the return values should always be checked
1313
to see if the operation succeeded before operating on any data modified or resources allocated by these functions.

cpp/ql/src/Critical/ReturnValueIgnored.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Return value of a function is ignored
3-
* @description A call to a function ignores its return value, but more than 80% of the total number of calls to the function check the return value. Check the return value of functions consistently, especially for functions like 'fread' or the 'scanf' functions that return the status of the operation.
3+
* @description A call to a function ignores its return value, but at least 90% of the total number of calls to the function check the return value. Check the return value of functions consistently, especially for functions like 'fread' or the 'scanf' functions that return the status of the operation.
44
* @kind problem
55
* @id cpp/return-value-ignored
66
* @problem.severity recommendation

0 commit comments

Comments
 (0)