libDtSvc: Resolve 89 compiler warnings.

This commit is contained in:
Peter Howkins
2012-09-01 21:35:10 +01:00
parent 92743e0999
commit e9bb2bcf09
24 changed files with 84 additions and 83 deletions

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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 */

View File

@@ -564,7 +564,7 @@ _DtAddResString(
int actualFormat;
unsigned long nitems, leftover;
if((data == NULL) || (*data == NULL))
if((data == NULL) || (*data == '\0'))
{
return;
}