This resolves the comments on pull request #590
va_list arglist;
git_error *error;
const char *oserr =
- (error_class == GITERR_OS && errno > 0) ? strerror(errno) : NULL;
+ (error_class == GITERR_OS && errno != 0) ? strerror(errno) : NULL;
error = &GIT_GLOBAL->error_t;
free(error->message);
assert(odb && backend);
- if (backend->odb != NULL && backend->odb != odb) {
- /*
- * TODO: Not sure how to convert this!
- */
- return git__throw(GIT_EBUSY, "The backend is already owned by another ODB");
- }
+ /* Check if the backend is already owned by another ODB */
+ assert(!backend->odb || backend->odb == odb);
internal = git__malloc(sizeof(backend_internal));
GITERR_CHECK_ALLOC(internal);