diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-06-07 22:43:03 +0200 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-06-07 22:43:48 +0200 |
commit | 3f0358604e48432b53abf097aa3ab6a1e3639813 (patch) | |
tree | c132a79507bb39fc37abb49e361f2f720bc69737 /src/remote.c | |
parent | 763b838152244c0d7433cde0046e9f67369074e3 (diff) | |
download | libgit2-3f0358604e48432b53abf097aa3ab6a1e3639813.tar.gz |
misc: Fix warnings from PVS Studio trial
Diffstat (limited to 'src/remote.c')
-rw-r--r-- | src/remote.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/remote.c b/src/remote.c index 8d6076107..00e108a0a 100644 --- a/src/remote.c +++ b/src/remote.c @@ -337,13 +337,16 @@ int git_remote_update_tips(git_remote *remote, int (*cb)(const char *refname, co unsigned int i = 0; git_buf refname = GIT_BUF_INIT; git_oid old; - git_vector *refs = &remote->refs; + git_vector *refs; git_remote_head *head; git_reference *ref; - struct git_refspec *spec = &remote->fetch; + struct git_refspec *spec; assert(remote); + refs = &remote->refs; + spec = &remote->fetch; + if (refs->length == 0) return 0; |