llvm-project/clang-tools-extra/docs/clang-tidy/checks/android-cloexec-fopen.rst

19 lines
331 B
ReStructuredText

.. title:: clang-tidy - android-cloexec-fopen
android-cloexec-fopen
=====================
``fopen()`` should include ``e`` in their mode string; so ``re`` would be
valid. This is equivalent to having set ``FD_CLOEXEC on`` that descriptor.
Examples:
.. code-block:: c++
fopen("fn", "r");
// becomes
fopen("fn", "re");