Commit 4be63a68 by Edward Thomson

errors: drop unneccessary g_git prefix

parent 3a4e08a7
......@@ -16,12 +16,12 @@
* New error handling
********************************************/
static git_error g_git_oom_error = {
static git_error oom_error = {
"Out of memory",
GIT_ERROR_NOMEMORY
};
static git_error g_git_uninitialized_error = {
static git_error uninitialized_error = {
"libgit2 has not been initialized; you must call git_libgit2_init",
GIT_ERROR_INVALID
};
......@@ -52,7 +52,7 @@ static void set_error(int error_class, char *string)
void git_error_set_oom(void)
{
GIT_THREADSTATE->last_error = &g_git_oom_error;
GIT_THREADSTATE->last_error = &oom_error;
}
void git_error_set(int error_class, const char *fmt, ...)
......@@ -134,7 +134,7 @@ const git_error *git_error_last(void)
{
/* If the library is not initialized, return a static error. */
if (!git_libgit2_init_count())
return &g_git_uninitialized_error;
return &uninitialized_error;
return GIT_THREADSTATE->last_error;
}
......@@ -150,13 +150,13 @@ int git_error_state_capture(git_error_state *state, int error_code)
return 0;
state->error_code = error_code;
state->oom = (error == &g_git_oom_error);
state->oom = (error == &oom_error);
if (error) {
state->error_msg.klass = error->klass;
if (state->oom)
state->error_msg.message = g_git_oom_error.message;
state->error_msg.message = oom_error.message;
else
state->error_msg.message = git_str_detach(error_buf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment