size_t *outLen) // OUT: Length of name out optional
{
HgfsNameStatus nameStatus;
- char const *inEnd;
- char *next;
+ const char *inEnd;
+ const char *next;
char *myBufOut;
char *convertedMyBufOut;
char *out;
/*
* Get first component.
*/
- len = CPName_GetComponent(cpName, inEnd, (char const **) &next);
+ len = CPName_GetComponent(cpName, inEnd, &next);
if (len < 0) {
LOG(4, ("%s: get first component failed\n", __FUNCTION__));
&dirName, &dirNameLength, &caseFlags)) {
nameStatus = HgfsServerGetLocalNameInfo(dirName, dirNameLength, caseFlags,
&shareInfo, &baseDir, &baseDirLen);
- status = HgfsPlatformSearchDir(nameStatus, (char *)dirName, dirNameLength, caseFlags,
+ status = HgfsPlatformSearchDir(nameStatus, dirName, dirNameLength, caseFlags,
&shareInfo, baseDir, baseDirLen,
input->session, &search);
if (HGFS_ERROR_SUCCESS == status) {
uint32 *numDents); // OUT: total number of directory entrys
HgfsInternalStatus
HgfsPlatformSearchDir(HgfsNameStatus nameStatus, // IN: name status
- char *dirName, // IN: relative directory name
+ const char *dirName, // IN: relative directory name
uint32 dirNameLength, // IN: length of dirName
uint32 caseFlags, // IN: case flags
HgfsShareInfo *shareInfo, // IN: sharfed folder information
HgfsInternalStatus
HgfsPlatformSearchDir(HgfsNameStatus nameStatus, // IN: name status
- char *dirName, // IN: relative directory name
+ const char *dirName, // IN: relative directory name
uint32 dirNameLength, // IN: length of dirName
uint32 caseFlags, // IN: case flags
HgfsShareInfo *shareInfo, // IN: sharfed folder information
switch (nameStatus) {
case HGFS_NAME_STATUS_COMPLETE:
{
- char *inEnd;
- char *next;
+ const char *inEnd;
+ const char *next;
int len;
ASSERT(baseDir);
inEnd = dirName + dirNameLength;
/* Get the first component. */
- len = CPName_GetComponent(dirName, inEnd, (char const **) &next);
+ len = CPName_GetComponent(dirName, inEnd, &next);
if (len >= 0) {
if (*inEnd != '\0') {
+ LOG(4, ("%s: dir name not nul-terminated!\n", __FUNCTION__));
/*
* NT4 clients can send the name without a nul-terminator.
- * The space for the nul is included and tested for in the size
+ * The space for the nul is included and tested for in the size
* calculations above. Size of structure (includes a single
* character of the name) and the full dirname length.
*/
- *inEnd = '\0';
+ *(char *)inEnd = '\0';
}
LOG(4, ("%s: dirName: %s.\n", __FUNCTION__, dirName));