aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/set.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/set.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/set.c')
-rw-r--r--src/tools/set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/set.c b/src/tools/set.c
index 7f9374d..b3f57ef 100644
--- a/src/tools/set.c
+++ b/src/tools/set.c
@@ -26,7 +26,7 @@ int set_main(int argc, char *argv[])
if (!device)
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");