From fde7be5151f7db096610cb59ca964e22e6af79fb Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Wed, 23 Jul 2014 19:07:38 -0700 Subject: coverity: fixed issue argument cannot be negative --- sesman/chansrv/devredir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sesman/chansrv/devredir.c') diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 121c1190..5a8ab3ed 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -118,7 +118,7 @@ dev_redir_init(void) } u; /* get a random number that will act as a unique clientID */ - if ((fd = open("/dev/urandom", O_RDONLY))) + if ((fd = open("/dev/urandom", O_RDONLY)) != -1) { if (read(fd, u.buf, 4) != 4) { -- cgit v1.2.1