From: Oliver Kurth Date: Mon, 4 May 2020 18:54:12 +0000 (-0700) Subject: Fix minor 'Comparison is always true' warning in linuxDeployment.c X-Git-Tag: stable-11.2.0~224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=384b1e7b9e9a6dac67a285eef0acdd52f5c997e5;p=thirdparty%2Fopen-vm-tools.git Fix minor 'Comparison is always true' warning in linuxDeployment.c pkgProcessTimeout is uint16 and comparison is always true because pkgProcessTimeout <= 65535, so remove the check. --- diff --git a/open-vm-tools/libDeployPkg/linuxDeployment.c b/open-vm-tools/libDeployPkg/linuxDeployment.c index eba1f3119..0355e8bb5 100644 --- a/open-vm-tools/libDeployPkg/linuxDeployment.c +++ b/open-vm-tools/libDeployPkg/linuxDeployment.c @@ -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;