summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRémi Duraffort <ivoire@videolan.org>2013-07-15 15:59:18 +0200
committerRémi Duraffort <ivoire@videolan.org>2013-07-15 16:29:00 +0200
commit9146f1e57ec4f2b6fa293c78d54f1383464ff5be (patch)
tree952b61c1a566a9e46673033185c5087324150e50 /src
parent351733128ca766d1fe73ca0f299b08725342574a (diff)
downloadlibgit2-9146f1e57ec4f2b6fa293c78d54f1383464ff5be.tar.gz
repository: clarify assignment and test order
Diffstat (limited to 'src')
-rw-r--r--src/repository.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repository.c b/src/repository.c
index bd7ef5476..99ac56ef9 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1500,12 +1500,12 @@ int git_repository_is_empty(git_repository *repo)
if (git_reference_lookup(&head, repo, GIT_HEAD_FILE) < 0)
return -1;
- if (!(error = git_reference_type(head) == GIT_REF_SYMBOLIC))
+ if (!((error = git_reference_type(head)) == GIT_REF_SYMBOLIC))
goto cleanup;
- if (!(error = strcmp(
+ if (!(error = (strcmp(
git_reference_symbolic_target(head),
- GIT_REFS_HEADS_DIR "master") == 0))
+ GIT_REFS_HEADS_DIR "master") == 0)))
goto cleanup;
error = repo_contains_no_reference(repo);