Last active
October 4, 2017 08:14
-
-
Save Fabian-Gruenbichler/8632d82204237a6219ba40c1258d261d to your computer and use it in GitHub Desktop.
variant with goto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint64_t obj = rwa->last_touched_object + 1; | |
int free_err = 0, next_err = 0; | |
while (next_err == 0) { | |
dmu_object_info_t doi; | |
free_err = dmu_object_info(rwa->os, obj, &doi); | |
if (free_err == ENOENT) | |
goto next; | |
else if (free_err != 0) | |
break; | |
free_err = dmu_free_long_object(rwa->os, obj); | |
if (free_err != 0) | |
break; | |
next: | |
next_err = dmu_object_next(rwa->os, &obj, FALSE, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment