Removed some useless variable assignments

This commit is contained in:
Pierre-Olivier Latour 2014-10-26 10:29:19 -07:00
parent 116a19d467
commit ea66215d87
4 changed files with 1 additions and 6 deletions

View File

@ -571,8 +571,6 @@ static int describe(
} }
} }
best = (struct possible_tag *)git_vector_get(&all_matches, 0);
git_vector_sort(&all_matches); git_vector_sort(&all_matches);
best = (struct possible_tag *)git_vector_get(&all_matches, 0); best = (struct possible_tag *)git_vector_get(&all_matches, 0);

View File

@ -949,8 +949,6 @@ find_best_matches:
* Rewrite the diffs with renames / copies * Rewrite the diffs with renames / copies
*/ */
tried_tgts = 0;
git_vector_foreach(&diff->deltas, t, tgt) { git_vector_foreach(&diff->deltas, t, tgt) {
/* skip things that are not rename targets */ /* skip things that are not rename targets */
if ((tgt->flags & GIT_DIFF_FLAG__IS_RENAME_TARGET) == 0) if ((tgt->flags & GIT_DIFF_FLAG__IS_RENAME_TARGET) == 0)

View File

@ -211,7 +211,7 @@ int git_oid_ncmp(const git_oid *oid_a, const git_oid *oid_b, size_t len)
int git_oid_strcmp(const git_oid *oid_a, const char *str) int git_oid_strcmp(const git_oid *oid_a, const char *str)
{ {
const unsigned char *a = oid_a->id; const unsigned char *a;
unsigned char strval; unsigned char strval;
int hexval; int hexval;

View File

@ -1105,7 +1105,6 @@ int git_packfile_alloc(struct git_pack_file **pack_out, const char *path)
p->pack_keep = 1; p->pack_keep = 1;
memcpy(p->pack_name + root_len, ".pack", sizeof(".pack")); memcpy(p->pack_name + root_len, ".pack", sizeof(".pack"));
path_len = path_len - strlen(".idx") + strlen(".pack");
} }
if (p_stat(p->pack_name, &st) < 0 || !S_ISREG(st.st_mode)) { if (p_stat(p->pack_name, &st) < 0 || !S_ISREG(st.st_mode)) {