Skip to content

Commit 2bfd2a1

Browse files
committed
fix compiler warnings
1 parent 533e385 commit 2bfd2a1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/ext-fwd.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ void fwd_debug(FILE *fp)
6464
now = time_now_sec();
6565
counter = 0;
6666
cur = g_fwds;
67+
6768
while (cur) {
68-
fprintf(fp, " port: %hu\n", cur->port);
69+
fprintf(fp, " port: %d\n", cur->port);
6970

7071
if (cur->refreshed == 0) {
7172
fprintf(fp, " refreshed: never\n");

src/upnp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ int upnp_handler(struct upnp_handle_t *handle, uint16_t port, time_t lifespan, t
179179

180180
// Add port forwarding
181181
if (handle->state == UPNP_STATE_ADD_PORTMAPPING) {
182-
if (handle->urls.controlURL && handle->data.first.servicetype) {
182+
if (handle->urls.controlURL && handle->data.first.servicetype[0]) {
183183
int rc_tcp = upnpAddPortMapping(handle, "TCP", port);
184184
int rc_udp = upnpAddPortMapping(handle, "UDP", port);
185185

0 commit comments

Comments
 (0)