1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-08 18:31:28 +01:00

52244: Fix a batch of minor defects reported by Coverity.

Coverity defects 1547831, 1547826 (remove unused function), 1521551,
1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789,
1255787, 1255782, 1255750
This commit is contained in:
Bart Schaefer 2023-10-26 08:27:18 -07:00
parent 0c15cc8712
commit 98a6892cb1
10 changed files with 38 additions and 37 deletions

View file

@ -7523,8 +7523,8 @@ restoredir(struct dirsav *d)
else if (d->level < 0)
err = -1;
if (d->dev || d->ino) {
stat(".", &sbuf);
if (sbuf.st_ino != d->ino || sbuf.st_dev != d->dev)
if (stat(".", &sbuf) < 0 ||
sbuf.st_ino != d->ino || sbuf.st_dev != d->dev)
err = -2;
}
return err;