Re: [PATCH 1/2] check-headers: add header usage checks for .c files

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

 



David Aguilar <davvid@xxxxxxxxx> writes:

> +check_header_usage () {
> +	first=$(grep '^#include' "$1" |
> +		head -n1 |
> +		sed -e 's,#include ",,' -e 's,"$,,')

perhaps a single "sed" invocation suffices?

	sed -n -e '/^#include/{
        	s/#include ["<]\(.*\)".*/\1/p
                q
	}' "$1"
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]