fileSize = MAXLINE + 1;
}
- line = (unsigned char *) malloc ((fileSize + 1) * sizeof(char *));
+ line = malloc(fileSize + 1);
if (line == NULL)
{
line = fallBackLine;
char *argv[20];
va_list args;
+#if 0
+ /* JET - this seems like a bad (and unused) idea */
/*
* Check for alternate resource loader.
*/
{
pgrm = CDE_INSTALLATION_TOP "/bin/dtsession_res";
}
+#else
+ pgrm = CDE_INSTALLATION_TOP "/bin/dtsession_res";
+#endif
/*
* By convention, exec() wants arg0 to be the program name. Ex: if pgrm
ptrSize += 50;
restorePtrArray = (char **)SM_REALLOC((char *)
restorePtrArray, ptrSize *
- sizeof(char **));
+ sizeof(char *));
if(restorePtrArray == NULL)
{
PrintErrnoError(DtError, smNLS.cantMallocErrorString);
SM_FREE((char *) remoteBuf[i]);
}
}
+ free(displayName);
return(-1);
}
cmdPtr = NULL;
if (!defaultCwd) {
if (getenv ("HOME"))
- defaultCwd = strdup (getenv ("HOME"));
+ defaultCwd = strndup (getenv("HOME"), MAXPATHLEN);
else
defaultCwd = getcwd (NULL, MAXPATHLEN + 1);