C coding style: indentation fixes

This commit is contained in:
J. David Ibáñez
2013-11-24 11:49:17 +01:00
parent b51bc45c63
commit f26d6bedfe
4 changed files with 27 additions and 26 deletions

View File

@@ -955,13 +955,13 @@ Repository_listall_branches(Repository *self, PyObject *args)
git_reference_free(ref); git_reference_free(ref);
if (py_branch_name == NULL) if (py_branch_name == NULL)
goto on_error; goto error;
err = PyList_Append(list, py_branch_name); err = PyList_Append(list, py_branch_name);
Py_DECREF(py_branch_name); Py_DECREF(py_branch_name);
if (err < 0) if (err < 0)
goto on_error; goto error;
} }
git_branch_iterator_free(iter); git_branch_iterator_free(iter);
@@ -975,7 +975,7 @@ Repository_listall_branches(Repository *self, PyObject *args)
return list; return list;
on_error: error:
git_branch_iterator_free(iter); git_branch_iterator_free(iter);
Py_CLEAR(list); Py_CLEAR(list);
return NULL; return NULL;
@@ -1116,26 +1116,27 @@ Repository_status(Repository *self, PyObject *args)
entry = git_status_byindex(list, i); entry = git_status_byindex(list, i);
if (entry == NULL) if (entry == NULL)
goto on_error; goto error;
/* We need to choose one of the strings */ /* We need to choose one of the strings */
path = entry->head_to_index ? if (entry->head_to_index)
entry->head_to_index->old_file.path : path = entry->head_to_index->old_file.path;
entry->index_to_workdir->old_file.path; else
path = entry->index_to_workdir->old_file.path;
status = PyLong_FromLong((long) entry->status); status = PyLong_FromLong((long) entry->status);
err = PyDict_SetItemString(dict, path, status); err = PyDict_SetItemString(dict, path, status);
Py_CLEAR(status); Py_CLEAR(status);
if (err < 0) if (err < 0)
goto on_error; goto error;
} }
git_status_list_free(list); git_status_list_free(list);
return dict; return dict;
on_error: error:
git_status_list_free(list); git_status_list_free(list);
Py_CLEAR(dict); Py_CLEAR(dict);
return NULL; return NULL;