[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] console/client: properly use time_t in get_pty_fd()



commit 2891f116e798a20ad35ab10e5a3c7f0c51156d81
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Aug 19 09:58:14 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Aug 19 09:58:14 2022 +0200

    console/client: properly use time_t in get_pty_fd()
    
    "int" is not a suitable type to hold time()'s return value.
    
    Coverity ID: 1509376
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 tools/console/client/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index ada6728caa..1a6fa162f7 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -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;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.