/*********************************************************
- * Copyright (C) 2007-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2007-2021 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
LockValues *ptr;
Bool myLockFile;
LockValues memberValues;
- char buffer[FILELOCK_DATA_SIZE];
if ((fileList[i] == NULL) || (*fileList[i] == 'E')) {
continue;
/* It's me! No need to read or validate anything. */
ptr = myValues;
} else {
+ char buffer[FILELOCK_DATA_SIZE];
/* It's not me! Attempt to extract the member values. */
err = FileLockMemberValues(lockDir, fileList[i], buffer,
FILELOCK_DATA_SIZE, &memberValues);
/*********************************************************
- * Copyright (C) 2006-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2021 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
File_ListDirectory(const char *dirName, // IN:
char ***ids) // OUT: relative paths
{
- int err = 0;
int count = -1;
WalkDirContext context = File_WalkDirectoryStart(dirName);
if (context != NULL) {
+ int err;
+
while (File_WalkDirectoryNext(context, NULL))
;
/*********************************************************
- * Copyright (C) 2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2020-2021 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
void *data) // IN:
{
oplockMonitorData *monitorData = data;
- DblLnkLst_Links *link, *nextLink;
- oplockMonitorCallbackList *callbackItem;
ASSERT(monitorData);
MXUser_AcquireExclLock(oplockMonitorLock);
if (HashTable_Lookup(gOplockMonitorMap, monitorData->utf8Name, NULL)) {
+ DblLnkLst_Links *link, *nextLink;
DblLnkLst_ForEachSafe(link, nextLink, &monitorData->callbackList) {
- callbackItem = DblLnkLst_Container(link, oplockMonitorCallbackList, links);
+ oplockMonitorCallbackList *callbackItem = DblLnkLst_Container(link,
+ oplockMonitorCallbackList,
+ links);
callbackItem->callback(session, callbackItem->data);
/*
* callbackItem->data has been freed in the user callback.
/* **********************************************************
- * Copyright (C) 2007-2020 VMware, Inc. All rights reserved.
+ * Copyright (c) 2007-2021 VMware, Inc. All rights reserved.
* **********************************************************/
/*
size_t offset) // IN
{
size_t origOffset = offset;
- signed char c;
if (offset > 0) {
+ signed char c;
/*
* Back up 1 byte and then find the start of the UTF-8 code
* point occupying that location.
/* **********************************************************
- * Copyright (C) 2015-2020 VMware, Inc. All rights reserved.
+ * Copyright (c) 2015-2021 VMware, Inc. All rights reserved.
* **********************************************************/
/*
{
size_t i;
uint32 state = UTF8_ACCEPT;
- unsigned char c;
for (i = 0; i < sizeIn; i++) {
- c = (unsigned char) *bufIn++;
+ unsigned char c = (unsigned char) *bufIn++;
if (UNLIKELY(c == '\0')) {
return FALSE;
/*********************************************************
- * Copyright (C) 2014-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2014-2021 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
void *arg, // IN
NicInfoPriority priority) // IN
{
- int i;
NicInfoV3 *nicInfo = arg;
ASSERT(entry);
if (entry->intf_link_addr.addr_type == ADDR_TYPE_ETH) {
char macAddress[NICINFO_MAC_LEN];
GuestNicV3 *nic = NULL;
+ int i;
Str_Sprintf(macAddress, sizeof macAddress, "%s",
addr_ntoa(&entry->intf_link_addr));
/*********************************************************
- * Copyright (C) 2013-2017,2019-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2013-2017,2019-2021 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
{
int left = len;
int sent = 0;
- int rv;
int sysErr;
while (left > 0) {
- rv = send(fd, buf + sent, left, 0);
+ int rv = send(fd, buf + sent, left, 0);
if (rv == SOCKET_ERROR) {
sysErr = SocketGetLastError();
if (sysErr == SYSERR_EINTR) {
/*********************************************************
- * Copyright (C) 2014-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2014-2021 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
if (!GuestInfoIsLinuxLvmDevice(fsName, partEntry)) {
/* Not an LVM; check if a basic block device. */
- char blockDevPath[PATH_MAX];
const char *baseDevName = strrchr(fsName, '/');
/*
* lookup; avoid at this time.
*/
if (baseDevName != NULL && strcmp(partEntry->fsType, "zfs") != 0) {
+ char blockDevPath[PATH_MAX];
+
/*
* Have a single disk device associated with this mount point. The
* majority of these will be handled by the basic Linux block device
unsigned int i;
RandR12Info *info = *pInfo;
XRRScreenResources *xrrRes = info->xrrRes;
- RandR12Output *rrOutput;
XRRCrtcInfo *crtc;
RRCrtc crtcID;
for (i = 0; i < info->nOutput; ++i) {
- rrOutput = &info->outputs[i];
+ RandR12Output *rrOutput = &info->outputs[i];
crtc = info->crtcs[rrOutput->crtc];
crtcID = xrrRes->crtcs[rrOutput->crtc];
/*********************************************************
- * Copyright (C) 2011-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2011-2021 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
GDir *dir;
GError *gErr;
const gchar *fileName;
- gchar *fullFileName;
gboolean saveBadFile = FALSE;
dir = g_dir_open(aliasStoreRootDir, 0, &gErr);
}
while ((fileName = g_dir_read_name(dir)) != NULL) {
- fullFileName = g_strdup_printf("%s"DIRSEP"%s",
- aliasStoreRootDir,
- fileName);
+ gchar *fullFileName = g_strdup_printf("%s"DIRSEP"%s",
+ aliasStoreRootDir,
+ fileName);
// mapping file is special
if (g_strcmp0(ALIASSTORE_MAPFILE_NAME, fileName) == 0) {
err = AliasCheckMapFilePerms(fullFileName);
/*********************************************************
- * Copyright (C) 2011-2016,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2011-2016,2019-2021 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
{
VGAuthError err;
gchar *packet;
- gchar *endPacket;
int num;
ServiceAlias *aList;
- int i;
- int j;
/*
* The alias code will do argument validation.
if (err != VGAUTH_E_OK) {
packet = Proto_MakeErrorReply(conn, req, err, "queryAliases failed");
} else {
+ int i;
+ gchar *endPacket;
+
packet = g_markup_printf_escaped(VGAUTH_QUERYALIASES_REPLY_FORMAT_START,
req->sequenceNumber);
// now the aliases
for (i = 0; i < num; i++) {
gchar *certPacket;
+ int j;
certPacket = g_markup_printf_escaped(VGAUTH_ALIAS_FORMAT_START,
aList[i].pemCert);
/*********************************************************
- * Copyright (C) 2008-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2021 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
VMBlockGetAttr(const char *path, // IN: File to get attributes of.
struct stat *statBuf) // OUT: Where to put the attributes.
{
- char target[PATH_MAX + 1];
vmblockSpecialDirEntry *dirEntry;
ASSERT(path != NULL);
ASSERT(statBuf != NULL);
}
}
if (strncmp(path, REDIRECT_DIR, strlen(REDIRECT_DIR)) == 0) {
+ char target[PATH_MAX + 1];
int status = RealReadLink(path, target, sizeof target);
LOG(4, "%s: Called RealReadLink which returned: %d\n", __func__, status);