]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
console/client: properly use time_t in get_pty_fd()
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Aug 2022 07:58:14 +0000 (09:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Aug 2022 07:58:14 +0000 (09:58 +0200)
"int" is not a suitable type to hold time()'s return value.

Coverity ID: 1509376
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
tools/console/client/main.c

index ada6728caadc53727aad68f6841681ccf0d7899a..1a6fa162f750692e4affa33abecae1fd22031d4f 100644 (file)
@@ -102,7 +102,7 @@ static int get_pty_fd(struct xs_handle *xs, char *path, int seconds)
        struct timeval tv;
        fd_set watch_fdset;
        int xs_fd = xs_fileno(xs), pty_fd = -1;
-       int start, now;
+       time_t start, now;
        unsigned int len = 0;
        char *pty_path, **watch_paths;