aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/setconf.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-14 23:21:11 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-02-14 23:21:11 +0100
commita7f2ceacb9ee09ab37302cddc0ce15a96fd95e70 (patch)
treef45fa9eef39cc0bbaa9b89dceb67fcee095626e5 /src/tools/setconf.c
parentblake2s: use union instead of casting (diff)
downloadwireguard-monolithic-historical-a7f2ceacb9ee09ab37302cddc0ce15a96fd95e70.tar.xz
wireguard-monolithic-historical-a7f2ceacb9ee09ab37302cddc0ce15a96fd95e70.zip
tools: normalize strncpy/snprintf usage
Diffstat (limited to 'src/tools/setconf.c')
-rw-r--r--src/tools/setconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/setconf.c b/src/tools/setconf.c
index b5b3cfb..f146a48 100644
--- a/src/tools/setconf.c
+++ b/src/tools/setconf.c
@@ -48,7 +48,7 @@ int setconf_main(int argc, char *argv[])
goto cleanup;
}
strncpy(device->name, argv[1], IFNAMSIZ - 1);
- device->name[IFNAMSIZ - 1] = 0;
+ device->name[IFNAMSIZ - 1] = '\0';
if (ipc_set_device(device) != 0) {
perror("Unable to set device");