Fix clearing mutable flags on ef_close()
Make ef_close() clear them always, even for views. Harmless, as
ef_open_view() always sets the same flags.
Drop redundant assignment to ep->flags in ef_open(). ef_close()
clears mutable flags, no need to clear them some more right before
calling it. Missed in commit 3eb3607f
, v4.3.0.
This commit is contained in:
parent
84cdd89060
commit
45c7337e70
1 changed files with 1 additions and 2 deletions
|
@ -145,7 +145,6 @@ ef_open(int type, int how, int nelt)
|
||||||
if ((how & EFF_MEM) && ep->fids) {
|
if ((how & EFF_MEM) && ep->fids) {
|
||||||
if (fillcache(ep, 0) != ep->fids) {
|
if (fillcache(ep, 0) != ep->fids) {
|
||||||
ep->cids = 0; /* prevent cache flush */
|
ep->cids = 0; /* prevent cache flush */
|
||||||
ep->flags &= EFF_IMMUTABLE; /* maintain invariant */
|
|
||||||
ef_close(type);
|
ef_close(type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -264,7 +263,6 @@ ef_close(int type)
|
||||||
else {
|
else {
|
||||||
if (!ef_flush(type))
|
if (!ef_flush(type))
|
||||||
retval = 0;
|
retval = 0;
|
||||||
ep->flags &= EFF_IMMUTABLE;
|
|
||||||
if (!(ep->flags & EFF_STATIC)) {
|
if (!(ep->flags & EFF_STATIC)) {
|
||||||
free(ep->cache);
|
free(ep->cache);
|
||||||
ep->cache = NULL;
|
ep->cache = NULL;
|
||||||
|
@ -275,6 +273,7 @@ ef_close(int type)
|
||||||
}
|
}
|
||||||
ep->fd = -1;
|
ep->fd = -1;
|
||||||
}
|
}
|
||||||
|
ep->flags &= EFF_IMMUTABLE;
|
||||||
ep->baseid = ep->cids = ep->fids = 0;
|
ep->baseid = ep->cids = ep->fids = 0;
|
||||||
if (ep->onresize && ep->onresize(type) < 0)
|
if (ep->onresize && ep->onresize(type) < 0)
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue