Skip to content

Commit 4be63a6

Browse files
committed
errors: drop unneccessary g_git prefix
1 parent 3a4e08a commit 4be63a6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libgit2/errors.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
* New error handling
1717
********************************************/
1818

19-
static git_error g_git_oom_error = {
19+
static git_error oom_error = {
2020
"Out of memory",
2121
GIT_ERROR_NOMEMORY
2222
};
2323

24-
static git_error g_git_uninitialized_error = {
24+
static git_error uninitialized_error = {
2525
"libgit2 has not been initialized; you must call git_libgit2_init",
2626
GIT_ERROR_INVALID
2727
};
@@ -52,7 +52,7 @@ static void set_error(int error_class, char *string)
5252

5353
void git_error_set_oom(void)
5454
{
55-
GIT_THREADSTATE->last_error = &g_git_oom_error;
55+
GIT_THREADSTATE->last_error = &oom_error;
5656
}
5757

5858
void git_error_set(int error_class, const char *fmt, ...)
@@ -134,7 +134,7 @@ const git_error *git_error_last(void)
134134
{
135135
/* If the library is not initialized, return a static error. */
136136
if (!git_libgit2_init_count())
137-
return &g_git_uninitialized_error;
137+
return &uninitialized_error;
138138

139139
return GIT_THREADSTATE->last_error;
140140
}
@@ -150,13 +150,13 @@ int git_error_state_capture(git_error_state *state, int error_code)
150150
return 0;
151151

152152
state->error_code = error_code;
153-
state->oom = (error == &g_git_oom_error);
153+
state->oom = (error == &oom_error);
154154

155155
if (error) {
156156
state->error_msg.klass = error->klass;
157157

158158
if (state->oom)
159-
state->error_msg.message = g_git_oom_error.message;
159+
state->error_msg.message = oom_error.message;
160160
else
161161
state->error_msg.message = git_str_detach(error_buf);
162162
}

0 commit comments

Comments
 (0)