mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-17 09:21:17 +01:00
42469: necessary repairs to 42465 found by "make check"
This commit is contained in:
parent
1219eae829
commit
d2350a1e80
3 changed files with 7 additions and 4 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2018-03-18 Barton E. Schaefer <schaefer@brasslantern.com>
|
||||||
|
|
||||||
|
* Stephane: 42469: Src/exec.c, Src/Modules/mapfile.c: fix 42465
|
||||||
|
|
||||||
2018-03-15 Peter Stephenson <p.stephenson@samsung.com>
|
2018-03-15 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* Stephane: 42465: Src/exec.c, Src/Modules/mapfile.c: pass error
|
* Stephane: 42465: Src/exec.c, Src/Modules/mapfile.c: pass error
|
||||||
|
|
|
||||||
|
|
@ -197,9 +197,8 @@ get_contents(char *fname)
|
||||||
val = NULL;
|
val = NULL;
|
||||||
if ((fd = open(fname, O_RDONLY | O_NOCTTY)) >= 0) {
|
if ((fd = open(fname, O_RDONLY | O_NOCTTY)) >= 0) {
|
||||||
LinkList ll;
|
LinkList ll;
|
||||||
int readerror;
|
|
||||||
|
|
||||||
if ((ll = readoutput(fd, 1, &readerror)))
|
if ((ll = readoutput(fd, 1, 0)))
|
||||||
val = peekfirst(ll);
|
val = peekfirst(ll);
|
||||||
}
|
}
|
||||||
#endif /* USE_MMAP */
|
#endif /* USE_MMAP */
|
||||||
|
|
|
||||||
|
|
@ -4599,8 +4599,8 @@ readoutput(int in, int qt, int *readerror)
|
||||||
}
|
}
|
||||||
*ptr++ = c;
|
*ptr++ = c;
|
||||||
}
|
}
|
||||||
if (readerror && ferror(fin))
|
if (readerror)
|
||||||
*readerror = errno;
|
*readerror = ferror(fin) ? errno : 0;
|
||||||
fclose(fin);
|
fclose(fin);
|
||||||
while (cnt && ptr[-1] == '\n')
|
while (cnt && ptr[-1] == '\n')
|
||||||
ptr--, cnt--;
|
ptr--, cnt--;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue