]> xenbits.xensource.com Git - xen.git/commit
tools/libs/stat: fix broken build
authorJuergen Gross <jgross@suse.com>
Sat, 12 Sep 2020 13:08:36 +0000 (15:08 +0200)
committerIan Jackson <iwj@xenproject.org>
Mon, 9 Nov 2020 17:45:32 +0000 (17:45 +0000)
commit7398a44e8636c99f6b06fb16d05a64ee06980d10
tree329fd5b219602305e75623089e95bfc133c70f1e
parent59b83663f925092f60f699147390c6cb77b55e43
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>
(cherry picked from commit c8099e48c3dbb8c7399551a265756ecf354eece2)
tools/xenstat/libxenstat/src/xenstat_linux.c