1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

26735: Check some function return values for failures. Gets rid of

some compiler warnings, and improves error handling/notification.
This commit is contained in:
Wayne Davison 2009-03-15 01:04:50 +00:00
parent f0bcd0ecd0
commit bf25c3a43f
8 changed files with 28 additions and 16 deletions

View file

@ -5422,7 +5422,8 @@ lchdir(char const *path, struct dirsav *d, int hard)
}
#ifdef HAVE_LSTAT
if (*path == '/')
chdir("/");
if (chdir("/") < 0)
zwarn("failed to chdir(/): %e", errno);
for(;;) {
while(*path == '/')
path++;