libDtSvc: Resolve 89 compiler warnings.
This commit is contained in:
@@ -443,7 +443,7 @@ _DtEnvControl(
|
||||
* then put our dt string just ahead of
|
||||
* "/usr/bin/X11" in the new PATH
|
||||
*/
|
||||
*(ptr - 1) = NULL;
|
||||
*(ptr - 1) = '\0';
|
||||
sprintf(_postDtEnvironment.binPath,
|
||||
"%s=%s:%s:%s",
|
||||
BIN_PATH_ENVIRON,
|
||||
@@ -479,7 +479,7 @@ _DtEnvControl(
|
||||
* "/usr/bin" in the new PATH
|
||||
*/
|
||||
|
||||
*(ptr - 1) = NULL;
|
||||
*(ptr - 1) = '\0';
|
||||
sprintf(_postDtEnvironment.binPath,
|
||||
"%s=%s:%s:%s",
|
||||
BIN_PATH_ENVIRON,
|
||||
|
||||
@@ -265,7 +265,7 @@ GetShortHostname(
|
||||
if (status = gethostname(buffer, bufsize))
|
||||
return status; /* failed gethostname */
|
||||
if (ptr = strstr(buffer, (char *)"."))
|
||||
*ptr = NULL; /* delete domain name if there is one */
|
||||
*ptr = '\0'; /* delete domain name if there is one */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ char * ExpandPath (
|
||||
/*** otherwise, make it relative to the current directory ***/
|
||||
|
||||
/* get user's current working directory */
|
||||
if (getcwd(tmpPath, MAXPATHLEN) == NULL) return NULL; /* RETURN: error */
|
||||
if (getcwd(tmpPath, MAXPATHLEN) == 0) return NULL; /* RETURN: error */
|
||||
|
||||
/*** add a slash to end of path component, if needed ***/
|
||||
/* get end of the string */
|
||||
|
||||
@@ -564,7 +564,7 @@ _DtAddResString(
|
||||
int actualFormat;
|
||||
unsigned long nitems, leftover;
|
||||
|
||||
if((data == NULL) || (*data == NULL))
|
||||
if((data == NULL) || (*data == '\0'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user