dtcm: Resolve 303 compiler warnings.

This commit is contained in:
Peter Howkins
2015-01-13 14:22:25 +00:00
parent fe39b630b3
commit 8baeb4c0a0
44 changed files with 275 additions and 250 deletions

View File

@@ -112,7 +112,7 @@ _GetGtime(char *timestr)
}
minute = atoi(&timestr[len - 2]);
timestr[len - 2] = NULL;
timestr[len - 2] = '\0';
hour = atoi(timestr);
if (hour > 23 || minute > 59)
@@ -273,7 +273,9 @@ init_dir()
}
/* Change current directory, so core file can be dumped. */
chdir (dir);
if(-1 == chdir (dir)) {
perror(strerror(errno));
}
}
/*
@@ -754,8 +756,12 @@ main(int argc, char **argv)
setgid (daemon_gid);
setuid (daemon_uid);
#else
setegid (daemon_gid);
seteuid (daemon_uid);
if(-1 == setegid (daemon_gid)) {
perror(strerror(errno));
}
if(-1 == seteuid (daemon_uid)) {
perror(strerror(errno));
}
#endif /* HPUX */
#endif /* AIX */