Re: [PATCH 2/2] maint: reject raw close, popen in 'make syntax-check'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/1/28 Eric Blake <eblake@xxxxxxxxxx>:
> commit f1fe9671e was supposed to make sure we use files.h
> macros to avoid double close, but it didn't work.
>
> Meanwhile, virCommand is vastly superior to system(), fork(),
> and popen() (also to virExec, but we haven't completed that
> conversion), so enforce that, too.
>
> * cfg.mk (sc_prohibit_close): Fix typo that excluded close, and
> add pclose.
> (sc_prohibit_fork_wrappers): New rule, for fork, system, and popen.
> * .x-sc_prohibit_close: More exemptions.
> * .x-sc_prohibit_fork_wrappers: New file.
> * Makefile.am (syntax_check_exceptions): Ship new file.
> * src/datatypes.c (virReleaseConnect): Tweak comment to avoid
> false positive.
> * src/util/files.h (VIR_CLOSE): Likewise.
> ---
> Â.x-sc_prohibit_close     |  Â6 ++++++
> Â.x-sc_prohibit_fork_wrappers | Â Â8 ++++++++
> ÂMakefile.am         Â|  Â1 +
> Âcfg.mk            |  Â9 ++++++++-
> Âsrc/datatypes.c       Â|  Â2 +-
> Âsrc/util/files.h       |  Â4 ++--
> Â6 files changed, 26 insertions(+), 4 deletions(-)
> Âcreate mode 100644 .x-sc_prohibit_fork_wrappers
>
> diff --git a/.x-sc_prohibit_close b/.x-sc_prohibit_close
> index 348200c..0b47b29 100644
> --- a/.x-sc_prohibit_close
> +++ b/.x-sc_prohibit_close
> @@ -1,3 +1,9 @@
> +# Non-C files:
> Â^docs/.*
> +^ChangeLog*
> Â^HACKING$
> +*.py$

Shouldn't the dot be escaped here like in the other lines you added?

> +# Wrapper implementation:
> Â^src/util/files.c$

And here too, although this one is pre-existing.

> +# Only uses close in documentation comments:
> +^src/libvirt\.c$

ACK, with that nit fixed.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]