snprintf(path, sizeof(path), "/proc/sys/net/ipv4/tcp_%s", name);
- info(" * Set tcp_%s to %s", name, set ? "on" : "off", name);
+ info(" * Set tcp_%s to %s", name, set ? "on" : "off");
if (!(f = fopen(path, "w")))
{
}
else if (redir->ipset.set && state->disable_ipsets)
{
- warn_section("redirect", redir, e, "skipped due to disabled ipset support",
- redir->name);
+ warn_section("redirect", redir, e, "skipped due to disabled ipset support");
return false;
}
else if (redir->ipset.set &&
!(redir->ipset.ptr = fw3_lookup_ipset(state, redir->ipset.name)))
{
- warn_section("redirect", redir, e, "refers to unknown ipset '%s'", redir->name,
+ warn_section("redirect", redir, e, "refers to unknown ipset '%s'",
redir->ipset.name);
return false;
}
struct fw3_address;
-void warn_elem(struct uci_element *e, const char *format, ...);
-void warn(const char *format, ...);
-void error(const char *format, ...);
-void info(const char *format, ...);
+void warn_elem(struct uci_element *e, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+void warn(const char *format, ...)
+ __attribute__ ((format (printf, 1, 2)));
+void error(const char *format, ...)
+ __attribute__ ((format (printf, 1, 2)));
+void info(const char *format, ...)
+ __attribute__ ((format (printf, 1, 2)));
#define warn_section(t, r, e, fmt, ...) \
#define fw3_command_pipe(...) __fw3_command_pipe(__VA_ARGS__, NULL)
void fw3_command_close(void);
-void fw3_pr(const char *fmt, ...);
+void fw3_pr(const char *fmt, ...)
+ __attribute__ ((format (printf, 1, 2)));
bool fw3_has_table(bool ipv6, const char *table);