]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
check-spacing: do not kill C++-style comments
authorJán Tomko <jtomko@redhat.com>
Fri, 5 Oct 2018 11:39:03 +0000 (13:39 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 6 Nov 2018 13:14:41 +0000 (14:14 +0100)
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 <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
build-aux/check-spacing.pl
src/libvirt.c

index ca8b434916851748dfaa6731b912be8167babca4..a32e355be6d19b34500b4fcac72e166fbe8e9494 100755 (executable)
@@ -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
index 0a738aefb1373fe9d0891ad79375213e8d84be33..7c379495ad0c514597a41580395dceedd22913a8 100644 (file)
@@ -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