mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-13 01:31:18 +02:00
35963: simplify condition found by coverity to include tautology
This commit is contained in:
parent
77a8cd7390
commit
3d9a8073c2
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
||||||
2015-07-31 Oliver Kiddle <opk@zsh.org>
|
2015-07-31 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 35963: Src/Modules/system.c: simplify condition found by
|
||||||
|
coverity scan to include tautology
|
||||||
|
|
||||||
* Matthew Martin: 35960 (tweaked): Completion/Unix/Command/_find:
|
* Matthew Martin: 35960 (tweaked): Completion/Unix/Command/_find:
|
||||||
complete correct options for OpenBSD's find
|
complete correct options for OpenBSD's find
|
||||||
|
|
||||||
|
|
|
@ -311,8 +311,7 @@ bin_sysopen(char *nam, char **args, Options ops, UNUSED(int func))
|
||||||
int write = OPT_ISSET(ops, 'w');
|
int write = OPT_ISSET(ops, 'w');
|
||||||
int append = OPT_ISSET(ops, 'a') ? O_APPEND : 0;
|
int append = OPT_ISSET(ops, 'a') ? O_APPEND : 0;
|
||||||
int flags = O_NOCTTY | append | ((append || write) ?
|
int flags = O_NOCTTY | append | ((append || write) ?
|
||||||
(read ? O_RDWR : O_WRONLY) :
|
(read ? O_RDWR : O_WRONLY) : O_RDONLY);
|
||||||
(!append || read) ? O_RDONLY : O_WRONLY);
|
|
||||||
char *opt, *ptr, *nextopt, *fdvar;
|
char *opt, *ptr, *nextopt, *fdvar;
|
||||||
int o, fd, explicit = -1;
|
int o, fd, explicit = -1;
|
||||||
mode_t perms = 0666;
|
mode_t perms = 0666;
|
||||||
|
|
Loading…
Reference in a new issue