diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-13 10:58:41 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-13 11:37:46 +0200 |
commit | cd917f48454875ad6b7fc69455281d72760c44ee (patch) | |
tree | 70a7a43fe43b7f893468f9120def5513774a242c /src/ci.c | |
parent | add command module to handle request-response communications (diff) | |
download | cimple-cd917f48454875ad6b7fc69455281d72760c44ee.tar.gz cimple-cd917f48454875ad6b7fc69455281d72760c44ee.zip |
best practices & coding style fixes
* I don't really need to declare all variables at the top of the
function anymore.
* Default-initialize variables more.
* Don't set the output parameter until the object is completely
constructed.
Diffstat (limited to 'src/ci.c')
-rw-r--r-- | src/ci.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -77,8 +77,8 @@ cleanup_repo: int ci_run_git_repo(const char *url, const char *rev, struct proc_output *output) { - char *oldpwd; - git_repository *repo; + char *oldpwd = NULL; + git_repository *repo = NULL; int ret = 0; ret = ci_prepare_git_repo(&repo, url, rev); |