Fix output specifier

This commit is contained in:
Chocobo1 2016-01-04 11:56:39 +08:00
parent 948b883966
commit e405f78b89
4 changed files with 9 additions and 9 deletions

View File

@ -154,7 +154,7 @@ tomato_save(const char *fname)
fclose(f); fclose(f);
rename(tmp, fname); rename(tmp, fname);
} }
else else
{ {
close(t); close(t);
} }
@ -261,7 +261,7 @@ static void
tomato_helper(void) tomato_helper(void)
{ {
struct stat st; struct stat st;
if (stat("/etc/upnp/delete", &st) == 0) if (stat("/etc/upnp/delete", &st) == 0)
{ {
tomato_delete(); tomato_delete();
@ -1606,7 +1606,7 @@ init(int argc, char * * argv, struct runtime_vars * v)
syslog(LOG_ERR, "MiniUPnPd is already running. EXITING"); syslog(LOG_ERR, "MiniUPnPd is already running. EXITING");
return 1; return 1;
} }
#ifdef TOMATO #ifdef TOMATO
syslog(LOG_NOTICE, "version " MINIUPNPD_VERSION " started"); syslog(LOG_NOTICE, "version " MINIUPNPD_VERSION " started");
#endif /* TOMATO */ #endif /* TOMATO */
@ -1892,7 +1892,7 @@ main(int argc, char * * argv)
shttpl_v4 = OpenAndConfHTTPSocket(&listen_port, 0); shttpl_v4 = OpenAndConfHTTPSocket(&listen_port, 0);
if(shttpl_v4 < 0) if(shttpl_v4 < 0)
{ {
syslog(LOG_ERR, "Failed to open socket for HTTP on port %hu (IPv4). EXITING", v.port); syslog(LOG_ERR, "Failed to open socket for HTTP on port %d (IPv4). EXITING", v.port);
return 1; return 1;
} }
} }
@ -1916,7 +1916,7 @@ main(int argc, char * * argv)
shttpsl_v4 = OpenAndConfHTTPSocket(&listen_port, 0); shttpsl_v4 = OpenAndConfHTTPSocket(&listen_port, 0);
if(shttpsl_v4 < 0) if(shttpsl_v4 < 0)
{ {
syslog(LOG_ERR, "Failed to open socket for HTTPS on port %hu (IPv4). EXITING", v.https_port); syslog(LOG_ERR, "Failed to open socket for HTTPS on port %d (IPv4). EXITING", v.https_port);
return 1; return 1;
} }
#endif /* V6SOCKETS_ARE_V6ONLY */ #endif /* V6SOCKETS_ARE_V6ONLY */

View File

@ -297,7 +297,7 @@ delete_pinhole(unsigned short uid)
info = (const struct ip6t_tcp *)&match->data; info = (const struct ip6t_tcp *)&match->data;
if((info->spts[0] == p->sport) && (info->dpts[0] == p->dport)) { if((info->spts[0] == p->sport) && (info->dpts[0] == p->dport)) {
if(!ip6tc_delete_num_entry(miniupnpd_v6_filter_chain, index, h)) { if(!ip6tc_delete_num_entry(miniupnpd_v6_filter_chain, index, h)) {
syslog(LOG_ERR, "ip6tc_delete_num_entry(%s,%d,...): %s", syslog(LOG_ERR, "ip6tc_delete_num_entry(%s,%u,...): %s",
miniupnpd_v6_filter_chain, index, ip6tc_strerror(errno)); miniupnpd_v6_filter_chain, index, ip6tc_strerror(errno));
goto error; goto error;
} }

View File

@ -228,7 +228,7 @@ read_learn_dscp_line(struct dscp_values *dscpvalues, char *p)
dscpvalues->dscp_value = 38; dscpvalues->dscp_value = 38;
break; break;
default: default:
fprintf(stderr, "Unknown AF value %u \n", af_value); fprintf(stderr, "Unknown AF value %d \n", af_value);
goto exit_err_and_cleanup; goto exit_err_and_cleanup;
} }
} }

View File

@ -79,7 +79,7 @@ port_in_use(const char *if_name,
ip_addr_str[0] = '\0'; ip_addr_str[0] = '\0';
} }
syslog(LOG_DEBUG, "Check protocol %s for port %d on ext_if %s %s, %08X", syslog(LOG_DEBUG, "Check protocol %s for port %u on ext_if %s %s, %08X",
(proto==IPPROTO_TCP)?"tcp":"udp", eport, if_name, (proto==IPPROTO_TCP)?"tcp":"udp", eport, if_name,
ip_addr_str, (unsigned)ip_addr.s_addr); ip_addr_str, (unsigned)ip_addr.s_addr);
@ -101,7 +101,7 @@ port_in_use(const char *if_name,
/* TODO add IPV6 support if enabled /* TODO add IPV6 support if enabled
* Presently assumes IPV4 */ * Presently assumes IPV4 */
#ifdef DEBUG #ifdef DEBUG
syslog(LOG_DEBUG, "port_in_use check port %d and address %s", tmp_port, eaddr); syslog(LOG_DEBUG, "port_in_use check port %u and address %s", tmp_port, eaddr);
#endif #endif
if (tmp_port == eport) { if (tmp_port == eport) {
char tmp_addr[4]; char tmp_addr[4];