summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8a65ff7)
raw | patch | inline | side by side (parent: 8a65ff7)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 3 Jul 2005 16:58:44 +0000 (09:58 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 3 Jul 2005 16:58:44 +0000 (09:58 -0700) |
A couple of bogus "might be used undefined" warnings are avoided
by moving the initializations unnecessarily early.
by moving the initializations unnecessarily early.
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 49517a414df74bb3d2a390db9bd9530f2fc518b3..a4ed4f9cdce7c5ee44aa6d429edaad1d1097b62b 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
return -1;
index = idx_map;
+ *idx_map_ = idx_map;
+ *idx_size_ = idx_size;
/* check index map */
if (idx_size < 4*256 + 20 + 20)
if (idx_size != 4*256 + nr * 24 + 20 + 20)
return error("wrong index file size");
- *idx_map_ = idx_map;
- *idx_size_ = idx_size;
return 0;
}
{
int st;
z_stream stream;
- char *buffer;
+ unsigned char *buffer;
buffer = xmalloc(size + 1);
buffer[size] = 0;
int find_pack_entry_one(const unsigned char *sha1,
struct pack_entry *e, struct packed_git *p)
{
- int *level1_ofs = p->index_base;
+ unsigned int *level1_ofs = p->index_base;
int hi = ntohl(level1_ofs[*sha1]);
int lo = ((*sha1 == 0x0) ? 0 : ntohl(level1_ofs[*sha1 - 1]));
void *index = p->index_base + 256;