tools/libs/stat: fix broken build
authorJuergen Gross <jgross@suse.com>
Sat, 12 Sep 2020 13:08:36 +0000 (15:08 +0200)
committerWei Liu <wl@xen.org>
Mon, 14 Sep 2020 09:48:08 +0000 (09:48 +0000)
commitc8099e48c3dbb8c7399551a265756ecf354eece2
treee49a1af3b7d23b21286e7846423a5975b3ea7190
parent6c5fb129e88b9c06b5fd62a410163ebb8ef77ee6
tools/libs/stat: fix broken build

Making getBridge() static triggered a build error with some gcc versions:

error: 'strncpy' output may be truncated copying 15 bytes from a string of
length 255 [-Werror=stringop-truncation]

Fix that by using a buffer with 256 bytes instead.

Fixes: 6d0ec053907794 ("tools: split libxenstat into new tools/libs/stat directory")
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libs/stat/xenstat_linux.c