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:
parent
f0bcd0ecd0
commit
bf25c3a43f
8 changed files with 28 additions and 16 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue