Re: [PATCH 1/5] Don't load ip6?_tables module when already loaded.

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

 



On 19.04.2011 03:23, Maciej Åenczykowski wrote:
> From: Maciej Åenczykowski <maze@xxxxxxxxxx>
> 
> Signed-off-by: Maciej Zenczykowski <maze@xxxxxxxxxx>
> ---
>  xshared.h |    2 ++
>  xtables.c |   34 +++++++++++++++++++++++++++++-----
>  2 files changed, 31 insertions(+), 5 deletions(-)
> 

> +/* return true if a given file exists within procfs */
> +static bool proc_file_exists(const char *filename)
> +{
> +	struct stat s;
> +	struct statfs f;
> +
> +	if (lstat(filename, &s)) return false;

Please put these return statements on lines of their own.

> +	if (!S_ISREG(s.st_mode)) return false;
> +	if (statfs(filename, &f)) return false;
> +	if (f.f_type != PROC_SUPER_MAGIC) return false;
> +	return true;
> +}
> +
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux