From d51ce171c7588b3dbcfdfccfa8d2c5d5c9733e81 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 4 Nov 2016 13:20:46 +0100 Subject: [PATCH] system-linux: cosmetic cleanup Signed-off-by: Felix Fietkau --- system-linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system-linux.c b/system-linux.c index a038987..67fa2b1 100644 --- a/system-linux.c +++ b/system-linux.c @@ -2485,10 +2485,12 @@ int system_update_ipv6_mtu(struct device *dev, int mtu) { int ret = -1; char buf[64]; + int fd; + snprintf(buf, sizeof(buf), "/proc/sys/net/ipv6/conf/%s/mtu", dev->ifname); - int fd = open(buf, O_RDWR); + fd = open(buf, O_RDWR); if (fd < 0) return ret; -- 2.30.2