diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2021-04-03 21:11:16 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2021-04-03 21:13:26 +0200 |
commit | 405da325b57e6793469964ee9a3bfe66df11d4ab (patch) | |
tree | 2060308b3fb98c629054dd64c28e9e196e3403df /src | |
parent | 8d8a8cd35137ff0fa11b6be455fdd596a8d7d2e9 (diff) |
odhcpd: fix extra compiler warning
src/odhcpd.c:143:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
snprintf(buf, sizeof(buf), sysctl_pattern, ifname, what);
^~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/odhcpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c index 04a8054..9797507 100644 --- a/src/odhcpd.c +++ b/src/odhcpd.c @@ -139,8 +139,8 @@ int main(int argc, char **argv) int odhcpd_get_interface_config(const char *ifname, const char *what) { char buf[64]; - const char *sysctl_pattern = "/proc/sys/net/ipv6/conf/%s/%s"; - snprintf(buf, sizeof(buf), sysctl_pattern, ifname, what); + + snprintf(buf, sizeof(buf), "/proc/sys/net/ipv6/conf/%s/%s", ifname, what); int fd = open(buf, O_RDONLY); if (fd < 0) |