gc_alloc: Remove redundant 'collected' assignment

The remaining assignment was added in upstream micropython; the
deleted assignment was added in circuitpython as part of the long-lived
object area feature.  During the merge, the redundant assignment
was not removed.

(since collected is a local variable and no pointers to it escape,
it doesn't seem possible for the placement of the assignment before
or after GC_ENTER() is important)

This diagnostic was found by clang 7's scan-build static analyzer.
This commit is contained in:
Jeff Epler 2019-10-08 10:54:13 +09:00
parent 0d96f1906b
commit 46b6870ffa

View File

@ -509,7 +509,6 @@ void *gc_alloc(size_t n_bytes, bool has_finaliser, bool long_lived) {
gc_collect();
collected = 1;
GC_ENTER();
collected = true;
}
#endif