aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-Remove-newline-from-format-line.patch
blob: 1453b75d567c88e056253984e1f04d9f2ffd7a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From a36afac485745cf980fba1809526f2025cb4d101 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 23 Apr 2017 00:16:45 -0700
Subject: [PATCH] Remove newline from format line

Fixes

error: '__builtin___snprintf_chk' output truncated before the last format character [-Werror=format-truncation=]
     "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
                                               ^

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

diff --git a/addrdb/addrdb.c b/addrdb/addrdb.c
index 4bb7f79..05d53f3 100644
--- a/addrdb/addrdb.c
+++ b/addrdb/addrdb.c
@@ -178,7 +178,7 @@ int addrdb_dump_leases(const char *lease_file)
 			continue;
 		}
 		snprintf(hwaddr_buf, sizeof(hwaddr_buf),
-				"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+				"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
 				lease->hwaddr[0], lease->hwaddr[1],
 				lease->hwaddr[2], lease->hwaddr[3],
 				lease->hwaddr[4], lease->hwaddr[5],
-- 
2.12.2