]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix minor 'Comparison is always true' warning in linuxDeployment.c
authorOliver Kurth <okurth@vmware.com>
Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)
pkgProcessTimeout is uint16 and comparison is always true because
pkgProcessTimeout <= 65535, so remove the check.

open-vm-tools/libDeployPkg/linuxDeployment.c

index eba1f31190c4022ae04f9fd6e68dc0d57875e959..0355e8bb547040fd0b210174174228dd8e7729ac 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2020 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -674,7 +674,7 @@ GetPackageInfo(const char* packageName,
    // Get process timeout value from client
    // If gProcessTimeout has been provided by deployment launcher, then
    // ignore the value from client.
-   if (hdr.pkgProcessTimeout > 0 && hdr.pkgProcessTimeout <= MAX_UINT16) {
+   if (hdr.pkgProcessTimeout > 0) {
       if (!gProcessTimeoutSetByLauncher) {
           sLog(log_info, "Process timeout value %u in header will be used.\n",
              hdr.pkgProcessTimeout);
@@ -683,9 +683,6 @@ GetPackageInfo(const char* packageName,
           sLog(log_info, "Process timeout value %u in header is ignored.\n",
              hdr.pkgProcessTimeout);
       }
-   } else if (hdr.pkgProcessTimeout != 0) {
-      sLog(log_error, "Invalid process timeout value in header: %d.\n",
-             hdr.pkgProcessTimeout);
    }
 
    return TRUE;