On Saturday 2011-01-15 00:10, MichaÅ MirosÅaw wrote: >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. Yeah, but I guess I don't need to mention that EINVAL being reported is almost always useless currently, because it stands for so many things. (At least most Xtables modules emit a console message in addition to it, but other subsystems don't do that so they have double a problem.) -- 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