3 ms·
Reading the diff, I'm neither surprised that this bug existed nor will I be surprised when similar bugs arise. There must be a more readable to write even low-
by jemfinch 10y ago
Reading the diff, I'm neither surprised that this bug existed nor will I be surprised when similar bugs arise.
There must be a more readable to write even low-level code like this.
- koverstreet 10y agoYes, there is. That code needs iterators.
- yoklov 10y agobut most of that code isn't iterating. the only parts in that function i see that are iterating ([0] and the similar loop below it) seems straightforward enough to me. i don't see how they would help here unless i don't know what you mean by iterators (assuming c++-style iterators or similar). [0]: http://gitweb.dragonflybsd.org/dragonfly.git/blob/cf297f2cccd7fd102041ebf174af66a31a5ef5ce:/sys/kern/vfs_cluster.c#l1294 http://gitweb.dragonflybsd.org/dragonfly.git/blob/cf297f2ccc...
- yoklov 10y agohonestly, i think it's hard to say this generally without more context into the code. imo nothing there looks too egregious (or at least not abnormally so) for very low level code.