bus/fpga: use strlcpy instead of strncpy
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Sat, 12 May 2018 07:02:17 +0000 (08:02 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 13 May 2018 10:06:01 +0000 (12:06 +0200)
commit4c80789430d617d7ed3159d80041919fdddb6cd7
treeabdb6030ee74eaee1de44b1f61b0724ba6b7feda
parent775a57eff2079cbf3cac1c8832067b8b281aa05b
bus/fpga: use strlcpy instead of strncpy

Gcc 8 reports a build error:

drivers/bus/ifpga/ifpga_bus.c:161:2: error: ‘strncpy’ specified
bound 256 equals destination size [-Werror=stringop-truncation]
  strncpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
drivers/bus/ifpga/ifpga_bus.c