On Fri, Jan 14, 2011 at 05:22:23PM -0500, Thomas Graf wrote: > On Fri, Jan 14, 2011 at 06:29:22PM +0100, Jan Engelhardt wrote: > > On Friday 2011-01-14 17:59, Thomas Graf wrote: > > >+static int audit_tg_check(const struct xt_tgchk_param *par) > > >+{ > > >+ const struct xt_AUDIT_info *info = par->targinfo; > > >+ > > >+ if (info->type > XT_AUDIT_TYPE_MAX) { > > >+ pr_info("Audit type out of range (valid range: 0..%u)\n", > > >+ XT_AUDIT_TYPE_MAX); > > >+ return -ERANGE; > > >+ } > > >+ > > >+ return 0; > > >+} > > Math nitpick: EDOM, not ERANGE. > ERANGE is the common error code to use in this situation. Actually, EINVAL is the correct one here since this is not a math function and the error does not refer to result of mathematical coputation. Best Regards, Michał Mirosław -- 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