aboutsummaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-01-17 00:57:23 -0500
committerShawn O. Pearce <spearce@spearce.org>2007-01-17 01:13:22 -0500
commit6f64f6d9d2b12cdae1648cbf536685c888f3b981 (patch)
tree1bb9393bd6e2452cf0cb39e360ae1481b2633d2c /fast-import.c
parent2104838bf9b97066f21e4c32efdfa424d41e6b98 (diff)
downloadgit-6f64f6d9d2b12cdae1648cbf536685c888f3b981.tar.gz
git-6f64f6d9d2b12cdae1648cbf536685c888f3b981.tar.xz
Correct a few types to be unsigned in fast-import.
The length of an atom string cannot be negative. So make it explicit and declare it as an unsigned value. The shift width in a mark table node also cannot be negative. I'm also moving it to after the pointer arrays to prevent any possible alignment problems on a 64 bit system. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c
index f1b26d103..2c500d6be 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -130,11 +130,11 @@ struct object_entry_pool
struct mark_set
{
- int shift;
union {
struct object_entry *marked[1024];
struct mark_set *sets[1024];
} data;
+ unsigned int shift;
};
struct last_object
@@ -157,7 +157,7 @@ struct mem_pool
struct atom_str
{
struct atom_str *next_atom;
- int str_len;
+ unsigned int str_len;
char str_dat[FLEX_ARRAY]; /* more */
};
@@ -192,8 +192,8 @@ struct branch
struct branch *table_next_branch;
struct branch *active_next_branch;
const char *name;
- unsigned long last_commit;
struct tree_entry branch_tree;
+ unsigned long last_commit;
unsigned int pack_id;
unsigned char sha1[20];
};