]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix issues discoved using Coverity.
authorVMware, Inc <>
Tue, 28 Jun 2011 18:57:52 +0000 (11:57 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 28 Jun 2011 18:57:52 +0000 (11:57 -0700)
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 <mvanzin@vmware.com>
open-vm-tools/lib/hgfsServer/hgfsServer.c

index f2f7fabcc71a04508e7900c5f3e35ee9afc2140e..59392bff2e245f569e804f32d36573a10aacddf7 100644 (file)
@@ -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;