aboutsummaryrefslogtreecommitdiff
path: root/src/nat/gnunet-service-nat_mini.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/nat/gnunet-service-nat_mini.c
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
downloadgnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz
gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip
tighten formatting rules
Diffstat (limited to 'src/nat/gnunet-service-nat_mini.c')
-rw-r--r--src/nat/gnunet-service-nat_mini.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nat/gnunet-service-nat_mini.c b/src/nat/gnunet-service-nat_mini.c
index 1382010bd..ae94e3f5b 100644
--- a/src/nat/gnunet-service-nat_mini.c
+++ b/src/nat/gnunet-service-nat_mini.c
@@ -443,8 +443,7 @@ process_refresh_output (void *cls, const char *line)
443 * 443 *
444 * "%s TCP PORT->STRING:OURPORT *" or 444 * "%s TCP PORT->STRING:OURPORT *" or
445 * "%s UDP PORT->STRING:OURPORT *" 445 * "%s UDP PORT->STRING:OURPORT *"
446 */ 446 */GNUNET_snprintf (pstr, sizeof(pstr), ":%u ", mini->port);
447 GNUNET_snprintf (pstr, sizeof(pstr), ":%u ", mini->port);
448 if (NULL == (s = strstr (line, "->"))) 447 if (NULL == (s = strstr (line, "->")))
449 return; /* skip */ 448 return; /* skip */
450 if (NULL == strstr (s, pstr)) 449 if (NULL == strstr (s, pstr))
@@ -554,8 +553,7 @@ process_map_output (void *cls, const char *line)
554 * The upnpc output we're after looks like this: 553 * The upnpc output we're after looks like this:
555 * 554 *
556 * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000" 555 * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000"
557 */ 556 */if ((NULL == (ipaddr = strstr (line, " "))) ||
558 if ((NULL == (ipaddr = strstr (line, " "))) ||
559 (NULL == (pstr = strstr (ipaddr, ":"))) || 557 (NULL == (pstr = strstr (ipaddr, ":"))) ||
560 (1 != sscanf (pstr + 1, "%u", &port))) 558 (1 != sscanf (pstr + 1, "%u", &port)))
561 { 559 {