[libvirt] [PATCH 3/4] lib: Fix c99 style comments
Daniel P. Berrange
berrange at redhat.com
Thu Apr 27 09:22:22 UTC 2017
On Thu, Apr 27, 2017 at 11:09:29AM +0200, Michal Privoznik wrote:
> On 04/27/2017 10:19 AM, Daniel P. Berrange wrote:
> > On Thu, Apr 27, 2017 at 09:01:59AM +0200, Michal Privoznik wrote:
> >> We prefer c89 style of comments.
> >>
> >> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> >> ---
> >> examples/openauth/openauth.c | 2 +-
> >> src/lxc/lxc_controller.c | 2 +-
> >> src/remote/remote_driver.c | 2 +-
> >> src/rpc/virnetservermdns.c | 2 +-
> >> src/security/security_stack.c | 8 ++++----
> >> src/uml/uml_conf.c | 2 +-
> >> src/util/virhostcpu.c | 4 ++--
> >> src/util/virhostmem.c | 4 ++--
> >> src/vbox/vbox_snapshot_conf.c | 2 +-
> >> tests/eventtest.c | 2 +-
> >> tests/virhostcpumock.c | 2 +-
> >> 11 files changed, 16 insertions(+), 16 deletions(-)
> >
> > How about a syntax-check rule to enforce this ?
>
> It's going to be not trivial. Consider:
>
> /* My awesome comment, that contains
> * http://an.url.com
> */
>
> It's not easy to know that line 2 of the comment is already in comment.
> We can't just forbid all '//' strings.
Our build-aux/bracket-spacing.pl script knows how to strip out /* ... */
It also strips // out, so we could just adapt it to whine when it sees
// comments, rather than try to do it using the cfg.mk rules.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list