C++: Clarify the note about file descriptors.

This commit is contained in:
Geoffrey White
2021-07-02 18:05:37 +01:00
parent d86a0ab7a5
commit cf8fa830a9

View File

@@ -19,8 +19,10 @@ import semmle.code.cpp.controlflow.Guards
* An operation on a filename that is likely to modify the corresponding file
* and may return an indication of success.
*
* Note: we're not interested in operations on file descriptors, as they
* are better behaved.
* Note: we're not interested in operations where the file is specified by a
* descriptor, rather than a filename, as they are better behaved. We are
* interested in functions that take a filename and return a file descriptor,
* however.
*/
FunctionCall filenameOperation(Expr path) {
exists(string name | name = result.getTarget().getName() |