From 912b8a59708497b75f17db158abb8471aff33cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 5 Oct 2018 13:39:03 +0200 Subject: [PATCH] check-spacing: do not kill C++-style comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our HACKING guide forbids these. There's no point in exempting these from the spacing check if their existence is against our coding style. Note that the non-usage of these comments itself is not enforced by syntax check, probably because of the need to implement a C parser. Signed-off-by: Ján Tomko Reviewed-by: Erik Skultety --- build-aux/check-spacing.pl | 3 --- src/libvirt.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build-aux/check-spacing.pl b/build-aux/check-spacing.pl index ca8b434916..a32e355be6 100755 --- a/build-aux/check-spacing.pl +++ b/build-aux/check-spacing.pl @@ -45,9 +45,6 @@ foreach my $file (@ARGV) { # Kill any quoted strings $data =~ s,"(?:[^\\\"]|\\.)*","XXX",g; - # Kill any C++ style comments - $data =~ s,//.*$,//,; - next if $data =~ /^#/; # Kill contents of multi-line comments diff --git a/src/libvirt.c b/src/libvirt.c index 0a738aefb1..7c379495ad 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -230,8 +230,8 @@ virWinsockInit(void) WSADATA winsock_data; /* http://msdn2.microsoft.com/en-us/library/ms742213.aspx */ - winsock_version = MAKEWORD (2, 2); - err = WSAStartup (winsock_version, &winsock_data); + winsock_version = MAKEWORD(2, 2); + err = WSAStartup(winsock_version, &winsock_data); return err == 0 ? 0 : -1; } #endif