Skip to content

Commit

Permalink
fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed May 18, 2018
1 parent 533e385 commit 2bfd2a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ext-fwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ void fwd_debug(FILE *fp)
now = time_now_sec();
counter = 0;
cur = g_fwds;

while (cur) {
fprintf(fp, " port: %hu\n", cur->port);
fprintf(fp, " port: %d\n", cur->port);

if (cur->refreshed == 0) {
fprintf(fp, " refreshed: never\n");
Expand Down
2 changes: 1 addition & 1 deletion src/upnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int upnp_handler(struct upnp_handle_t *handle, uint16_t port, time_t lifespan, t

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

Expand Down

0 comments on commit 2bfd2a1

Please sign in to comment.