mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-15 20:51:27 +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>
|
||||
|
||||
* Stephane: 42465: Src/exec.c, Src/Modules/mapfile.c: pass error
|
||||
|
|
|
|||
|
|
@ -197,9 +197,8 @@ get_contents(char *fname)
|
|||
val = NULL;
|
||||
if ((fd = open(fname, O_RDONLY | O_NOCTTY)) >= 0) {
|
||||
LinkList ll;
|
||||
int readerror;
|
||||
|
||||
if ((ll = readoutput(fd, 1, &readerror)))
|
||||
if ((ll = readoutput(fd, 1, 0)))
|
||||
val = peekfirst(ll);
|
||||
}
|
||||
#endif /* USE_MMAP */
|
||||
|
|
|
|||
|
|
@ -4599,8 +4599,8 @@ readoutput(int in, int qt, int *readerror)
|
|||
}
|
||||
*ptr++ = c;
|
||||
}
|
||||
if (readerror && ferror(fin))
|
||||
*readerror = errno;
|
||||
if (readerror)
|
||||
*readerror = ferror(fin) ? errno : 0;
|
||||
fclose(fin);
|
||||
while (cnt && ptr[-1] == '\n')
|
||||
ptr--, cnt--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue