commit - bc5e881ab9b3f23c4c4d00845d2e553d4fcd7e56
commit + 3e99fbc53402ddf1e875a7399c51253825c8c310
blob - fb5211d500574e714e2964dd6a9ab1ac8433e57d
blob + f3608d970c5ae77fee89a4e9ca8fdb89b015c5f8
--- got/got.c
+++ got/got.c
TAILQ_FOREACH(re, &refs, entry) {
char *refstr;
refstr = got_ref_to_str(re->ref);
- if (refstr == NULL)
- return got_error_from_errno("got_ref_to_str");
+ if (refstr == NULL) {
+ err = got_error_from_errno("got_ref_to_str");
+ break;
+ }
printf("%s: %s\n", got_ref_get_name(re->ref), refstr);
free(refstr);
}
got_ref_list_free(&refs);
- return NULL;
+ return err;
}
static const struct got_error *