]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Remove dead code in dndCommon.c reported by Coverity.
authorOliver Kurth <okurth@vmware.com>
Wed, 30 Oct 2019 18:18:23 +0000 (11:18 -0700)
committerOliver Kurth <okurth@vmware.com>
Wed, 30 Oct 2019 18:18:23 +0000 (11:18 -0700)
open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c

index ed592f4829da4e2023aaed2f4e360a7e9e83e9ac..44f4cf3975ad332f555970363e67468ec58717c0 100644 (file)
@@ -502,23 +502,18 @@ DnD_LegacyConvertToCPName(const char *nameIn,   // IN:  Buffer to convert
        */
 
       for (; *winNameIn != '\0' && bufOut < endOut; winNameIn++) {
-         if (ignores) {
-            char *currIgnore = ignores;
-            Bool ignore = FALSE;
-
-            while (*currIgnore != '\0') {
-               if (*winNameIn == *currIgnore) {
-                  ignore = TRUE;
-                  break;
-               }
-               currIgnore++;
-            }
+         char *currIgnore = ignores;
+         Bool ignore = FALSE;
 
-            if (!ignore) {
-               *bufOut = (*winNameIn == pathSep) ? '\0' : *winNameIn;
-               bufOut++;
+         while (*currIgnore != '\0') {
+            if (*winNameIn == *currIgnore) {
+               ignore = TRUE;
+               break;
             }
-         } else {
+            currIgnore++;
+         }
+
+         if (!ignore) {
             *bufOut = (*winNameIn == pathSep) ? '\0' : *winNameIn;
             bufOut++;
          }