From a7f2ceacb9ee09ab37302cddc0ce15a96fd95e70 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 14 Feb 2018 23:21:11 +0100 Subject: tools: normalize strncpy/snprintf usage --- src/tools/setconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/setconf.c') 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"); -- cgit v1.2.3-59-g8ed1b