From 40848547abf592c8d29b85ef1346001514944435 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 17 Jun 2017 10:14:20 -0700
Subject: [PATCH] Fix build with format string checks

Fixes
| ruli_addr.c:418:5: error: format not a string literal and no format arguments [-Werror=format-security]
|      return fprintf(out, inet_ntoa(addr->ipv4));
|      ^~~~~~

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/ruli_addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/ruli_addr.c
+++ b/src/ruli_addr.c
@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli
 {
   switch (family) {
   case PF_INET:
-    return fprintf(out, inet_ntoa(addr->ipv4));
+    return fprintf(out, "%s", inet_ntoa(addr->ipv4));
 
   case PF_INET6:
     return ruli_inet6_print(out, &addr->ipv6);
--- a/sample/getaddrinfo.c
+++ b/sample/getaddrinfo.c
@@ -174,7 +174,7 @@ static void solve(const char *fullname)
 
       for (ai = ai_res; ai; ai = ai->ai_next) {
 
-	printf(fullname);
+	printf("%s", fullname);
 
 	switch (ai->ai_family) {
 	case PF_INET:
--- a/sample/ruli-getaddrinfo.c
+++ b/sample/ruli-getaddrinfo.c
@@ -176,7 +176,7 @@ static void solve(const char *fullname)
 
       for (ai = ai_res; ai; ai = ai->ai_next) {
 
-	printf(fullname);
+	printf("%s", fullname);
 
 	switch (ai->ai_family) {
 	case PF_INET:
