aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--udp514-journal.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index d258dba..92725fe 100644
--- a/README.md
+++ b/README.md
@@ -77,3 +77,6 @@ URL:
Mirror:
[eworm.de](https://git.eworm.de/cgit.cgi/udp514-journal/)
[GitLab.com](https://gitlab.com/eworm-de/udp514-journal#udp514-journal)
+
+---
+[⬆️ Go back to top](#top)
diff --git a/udp514-journal.c b/udp514-journal.c
index c37da95..402785c 100644
--- a/udp514-journal.c
+++ b/udp514-journal.c
@@ -108,8 +108,8 @@ int main(int argc, char **argv) {
}
break;
case AF_INET:
- address = inet_ntop(AF_INET, &addr_client_in->sin_addr,
- addr_buf, INET6_ADDRSTRLEN);
+ const struct in_addr *in_addr = &addr_client_in->sin_addr;
+ address = inet_ntop(AF_INET, in_addr, addr_buf, INET6_ADDRSTRLEN);
break;
default:
fputs("unhadled address family", stderr);