diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-02-14 23:21:11 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-02-14 23:21:11 +0100 |
commit | 186272048dbc32e79226ed194b153030d0453f27 (patch) | |
tree | 5c2501070e83dfb7a791adbb48ecd3562e0df40c /src/setconf.c | |
parent | wg-quick: match from beginning rather than shift right (diff) | |
download | wireguard-tools-186272048dbc32e79226ed194b153030d0453f27.tar.xz wireguard-tools-186272048dbc32e79226ed194b153030d0453f27.zip |
wg: normalize strncpy/snprintf usage
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/setconf.c')
-rw-r--r-- | src/setconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/setconf.c b/src/setconf.c index b5b3cfb..f146a48 100644 --- a/src/setconf.c +++ b/src/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"); |