Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions open-vm-tools/lib/hgfs/hgfsEscape.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ HgfsAddEscapeCharacter(char const * bufIn, // IN: input name
HgfsEscapeContext *escapeContext = (HgfsEscapeContext *)context;
uint32 charactersToCopy;
uint32 outputSpace;
char* illegal;
const char* illegal;
Bool result = TRUE;

ASSERT(offset >= escapeContext->processedOffset); // Scanning forward
Expand Down Expand Up @@ -573,7 +573,7 @@ HgfsIsEscapeSequence(char const *bufIn, // IN: input name
uint32 length) // IN: length of the name in characters
{
if (bufIn[offset] == HGFS_ESCAPE_CHAR && offset > 0) {
char *substitute;
const char *substitute;
if (bufIn[offset - 1] == HGFS_ESCAPE_SUBSTITUE_CHAR && offset > 1) {
/*
* Possibly a valid sequence, check it must be preceded with a substitute
Expand Down Expand Up @@ -887,7 +887,7 @@ HgfsEscapeUndoComponent(char *bufIn, // IN: Characters to be unesc
size_t offset = escapePointer - bufIn;

if (HgfsIsEscapeSequence(bufIn, offset, sizeIn)) {
char* substitute = strchr(HGFS_SUBSTITUTE_CHARS, bufIn[offset - 1]);
const char* substitute = strchr(HGFS_SUBSTITUTE_CHARS, bufIn[offset - 1]);
if (substitute != NULL) {
bufIn[offset - 1] = HGFS_ILLEGAL_CHARS[substitute - HGFS_SUBSTITUTE_CHARS];
} else if (bufIn[offset - 1] == HGFS_ESCAPE_SUBSTITUE_CHAR) {
Expand Down
2 changes: 1 addition & 1 deletion open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ static void
HgfsGetHiddenAttr(char const *fileName, // IN: Input filename
HgfsFileAttrInfo *attr) // OUT: Struct to copy into
{
char *baseName;
const char *baseName;

ASSERT(fileName);
ASSERT(attr);
Expand Down
7 changes: 4 additions & 3 deletions open-vm-tools/lib/misc/strutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ StrUtil_ReplaceAll(const char *orig, // IN
char *result;
const char *current;
char *tmp;
const char *tmp2;
size_t lenWhat;
size_t lenWith;
size_t occurrences = 0;
Expand All @@ -1467,8 +1468,8 @@ StrUtil_ReplaceAll(const char *orig, // IN
lenWith = strlen(with);

current = orig;
while ((tmp = strstr(current, what)) != NULL) {
current = tmp + lenWhat;
while ((tmp2 = strstr(current, what)) != NULL) {
current = tmp2 + lenWhat;
++occurrences;
}

Expand Down Expand Up @@ -1695,7 +1696,7 @@ StrUtilHasListItem(char const *list, // IN:
char const *item, // IN:
int (*ncmp)(char const *, char const*, size_t)) // IN:
{
char *foundDelim;
const char *foundDelim;
int itemLen = strlen(item);

if (list == NULL) {
Expand Down
2 changes: 1 addition & 1 deletion open-vm-tools/lib/nicInfo/nicInfoPosix.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static Bool
IpEntryMatchesDevice(const char *devName,
const char *label)
{
char *p;
const char *p;
size_t n;

if ((p = strchr(label, ':')) != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion open-vm-tools/libvmtools/i18n.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ VMTools_BindTextDomain(const char *domain,
* If we couldn't find the catalog file for the user's language, see if
* we can find a more generic language (e.g., for "en_US", also try "en").
*/
char *sep = Str_Strrchr(lang, '_');
const char *sep = Str_Strrchr(lang, '_');
if (sep != NULL) {
if (usrlang == NULL) {
usrlang = Util_SafeStrdup(lang);
Expand Down
2 changes: 1 addition & 1 deletion open-vm-tools/services/plugins/vix/vixTools.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ VixToolsBuildUserEnvironmentTable(const char * const *envp) // IN: optional
for (; NULL != *envp; envp++) {
char *name;
char *value;
char *whereToSplit;
const char *whereToSplit;
size_t nameLen;

whereToSplit = strchr(*envp, '=');
Expand Down