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