From: Oliver Kurth Date: Mon, 4 May 2020 18:54:12 +0000 (-0700) Subject: Fix minor misc. issues. X-Git-Tag: stable-11.2.0~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdd112cee037f58b2788d7bc3f1dbc9fa5344d97;p=thirdparty%2Fopen-vm-tools.git Fix minor misc. issues. * In ServiceLoadFileContentsPosix() function, fd is always a positive value when close() is called. The if check 'fd >= 0' is not really required. Removed it. * Fixed the function name in the "procedure comment block" for the ParseShareName function. --- diff --git a/open-vm-tools/hgfsmounter/hgfsmounter.c b/open-vm-tools/hgfsmounter/hgfsmounter.c index 3f6798dc4..03aedf64e 100644 --- a/open-vm-tools/hgfsmounter/hgfsmounter.c +++ b/open-vm-tools/hgfsmounter/hgfsmounter.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 @@ -224,7 +224,7 @@ GetPathMax(const char *path) // IN: path to check /* *----------------------------------------------------------------------------- * - * IsValidShareName + * ParseShareName * * A helper function to parse the share name from "host:share" format into * two separate strings, reporting errors if any. diff --git a/open-vm-tools/vgauth/serviceImpl/alias.c b/open-vm-tools/vgauth/serviceImpl/alias.c index 89156008b..f6cde02cf 100644 --- a/open-vm-tools/vgauth/serviceImpl/alias.c +++ b/open-vm-tools/vgauth/serviceImpl/alias.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2019 VMware, Inc. All rights reserved. + * Copyright (C) 2011-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 @@ -845,9 +845,8 @@ done: *contents = buf; *fileSize = lstatBuf.st_size; } - if (fd >= 0) { - close(fd); - } + + close(fd); return err; }