From ad6aa096e49a4ea78ca7816f6385c4d23c498fcd Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Wed, 11 Sep 2013 02:34:18 +1200 Subject: libxl: correctly handle readlink() errors readlink() returns a ssize_t with a negative value on failure. Coverity-ID: 1055566 Signed-off-by: Matthew Daley Acked-by: Ian Jackson --- tools/libxl/libxl_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/libxl') diff --git a/tools/libxl/libxl_exec.c b/tools/libxl/libxl_exec.c index 98bfd716ac..7eddaef2e3 100644 --- a/tools/libxl/libxl_exec.c +++ b/tools/libxl/libxl_exec.c @@ -33,7 +33,7 @@ static void check_open_fds(const char *what) for (i = 4; i < 256; i++) { #ifdef __linux__ - size_t len; + ssize_t len; char path[PATH_MAX]; char linkpath[PATH_MAX+1]; #endif -- cgit v1.2.3