diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/builtin.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index b31b04fa3..dc091bf0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-01-08 Barton E. Schaefer <schaefer@zsh.org> + + * unposted (cf. Jun T.: 37516): Src/builtin.c: refine READ_MSTREAM + to avoid unsequenced evaluation + 2016-01-06 Barton E. Schaefer <schaefer@zsh.org> * 37513 (cf. Jun T.: 37508): Src/builtin.c: fix typos; improve diff --git a/Src/builtin.c b/Src/builtin.c index b1a0db8ae..5dce2d9f1 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -4063,7 +4063,7 @@ bin_print(char *name, char **args, Options ops, int func) #define READ_MSTREAM(BUF,FOUT) \ ((((count = ftell(FOUT)), (BUF = (char *)zalloc(count + 1))) && \ ((fseek(FOUT, 0L, SEEK_SET) == 0) && !(BUF[count] = '\0')) && \ - ((count = fread(BUF, 1, count, FOUT)) == count)) ? count : (size_t)-1) + (fread(BUF, 1, count, FOUT) == count)) ? count : (size_t)-1) #define CLOSE_MSTREAM(FOUT) fclose(FOUT) #endif |