5 ms·
I've been going with this style for things like reading files (with retries) or any sort of loop that feels awkward. while (1) { int ret = ...; if (r
by dpzmick 7y ago
I've been going with this style for things like reading files (with retries) or any sort of loop that feels awkward.
while (1) {
int ret = ...;
if (ret == ...) break;
if (ret == some_other_condition) break;
// additional termination conditions....
// do exactly one thing
}