From: VMware, Inc <> Date: Tue, 28 Jun 2011 18:57:52 +0000 (-0700) Subject: Fix issues discoved using Coverity. X-Git-Tag: 2011.06.27-437995~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fc4f0c18c31aaadad5f82b4ff19aef9ebafdbcf;p=thirdparty%2Fopen-vm-tools.git Fix issues discoved using Coverity. In a specific function i.e. HgfsServerSearchRead, we check if an a variable of type unsigned int is less than zero which is clearly a no-op. Fixed this code. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c index f2f7fabcc..59392bff2 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c @@ -7712,7 +7712,7 @@ HgfsServerSearchRead(HgfsInputParam *input) // IN: Input params HgfsServerPolicy_GetSharesInit, HgfsServerPolicy_GetSharesCleanup, &rootSearch->dents); - if (rootSearch->numDents < 0) { + if (((int) (rootSearch->numDents)) < 0) { ASSERT_DEVEL(0); LOG(4, ("%s: couldn't get root dents\n", __FUNCTION__)); rootSearch->numDents = 0;