Avoid more gcc warning about not checking return values ...

This commit is contained in:
Roy Marples
2009-04-30 19:56:43 +01:00
parent 21e45e895c
commit 3d0e5175d8
4 changed files with 21 additions and 12 deletions

View File

@ -1106,7 +1106,8 @@ runscript(int argc, char **argv)
usage(EXIT_FAILURE);
/* Change dir to / to ensure all init scripts don't use stuff in pwd */
chdir("/");
if (chdir("/") == -1)
eerror("chdir: %s", strerror(errno));
if ((runlevel = xstrdup(getenv("RC_RUNLEVEL"))) == NULL) {
env_filter();