-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines
-
StorEng - Defined Pipeline
WiredTiger uses this idiom in a few dozen places:
did_work = yield == 0;
In this case (taken from __log_wrlsn_server), we are setting did_work to true if yield is zero.
But it is easy to misread this as an assignment of zero to both did_work and yield. This is an easy point of confusion because we frequently initialize multiple variables on the same line in a similar manner.
To help avoid this type of misreading, we should change this usage to:
did_work = (yield == 0);