cleanup: Remove the duplicate header

Detected by a simple Shell script:

for i in $(git ls-files -- '*.[ch]'); do
    awk 'BEGIN {
        fail=0
    }
    /# *include.*\.h/{
        match($0, /["<][^">]*[">]/)
        arr[substr($0, RSTART+1, RLENGTH-2)]++
    }
    END {
        for (key in arr) {
            if (arr[key] > 1) {
                fail=1
                printf("%d %s\n", arr[key], key)
            }
        }
        if (fail == 1)
            exit 1
    }' $i

    if test $? != 0; then
        echo "Duplicate header(s) in $i"
    fi
done;

A later patch will add the syntax-check to avoid duplicate
headers.
This commit is contained in:
Osier Yang 2013-04-16 21:41:43 +08:00
parent 2beae9c202
commit bc95be5dea
14 changed files with 0 additions and 14 deletions

View File

@ -51,7 +51,6 @@
#include "virnetlink.h"
#include "virnetserver.h"
#include "remote.h"
#include "remote_driver.h"
#include "virhook.h"
#include "viraudit.h"
#include "locking/lock_manager.h"

View File

@ -31,7 +31,6 @@
#include "viralloc.h"
#include "node_device_conf.h"
#include "viralloc.h"
#include "virxml.h"
#include "virutil.h"
#include "virbuffer.h"

View File

@ -39,7 +39,6 @@
#include "viralloc.h"
#include "viruuid.h"
#include "vircommand.h"
#include "libxl.h"
#include "libxl_driver.h"
#include "libxl_conf.h"
#include "xen_xm.h"

View File

@ -39,7 +39,6 @@
#include <signal.h>
#include <paths.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <net/if.h>

View File

@ -36,7 +36,6 @@
#include <dirent.h>
#include <time.h>
#include <sys/stat.h>
#include <unistd.h>
#include <limits.h>
#include <errno.h>
#include <string.h>

View File

@ -41,7 +41,6 @@
#include <fcntl.h>
#include <paths.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/wait.h>
#include "virerror.h"

View File

@ -35,7 +35,6 @@
#include <fcntl.h>
#include <paths.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/statvfs.h>

View File

@ -33,7 +33,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <libssh2.h>
#include <netinet/in.h>
#include <arpa/inet.h>

View File

@ -27,7 +27,6 @@
# include "virobject.h"
# include "capabilities.h"
# include "vircommand.h"
# include "virobject.h"
# include "qemu_monitor.h"
/* Internal flags to keep track of qemu command line capabilities */

View File

@ -38,7 +38,6 @@
#include <fcntl.h>
#include <signal.h>
#include <paths.h>
#include <stdio.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <sys/un.h>

View File

@ -43,7 +43,6 @@
#include "virfile.h"
#include "virhash.h"
#include "virrandom.h"
#include "virutil.h"
#include "virconf.h"
#include "virtpm.h"

View File

@ -38,7 +38,6 @@
#include <signal.h>
#include <paths.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <sys/inotify.h>

View File

@ -29,7 +29,6 @@
#include "virnetdevopenvswitch.h"
#include "virerror.h"
#include "virfile.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
#include "virutil.h"

View File

@ -33,7 +33,6 @@
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <limits.h>
#include <stdint.h>
#include <regex.h>
#include <errno.h>