]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix minor misc. issues.
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)
* 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.

open-vm-tools/hgfsmounter/hgfsmounter.c
open-vm-tools/vgauth/serviceImpl/alias.c

index 3f6798dc4704f0e52c420fbe896e387a0c414ea8..03aedf64e1f450c8cce6c414e081793a483d7ccf 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
@@ -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.
index 89156008b55e00005bae6a6cf14be3bbad19b315..f6cde02cf978b8921fac1199241805577096a5a2 100644 (file)
@@ -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;
 }