Remove unnecessary casts from fast-import
Jeff King pointed out that these casts are quite unnecessary, as the compiler should be doing them anyway, and may cause problems in the future if the size of the argument for to_atom were to ever be increased. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Mar 12, 2007 at 15:48 UTC
061e35c581cb75cb228640a4e40f0d4a5986c11c
1 file changed
+2
-2
fast-import.c
+2
-2
@@ -1066,7 +1066,7 @@ static void load_tree(struct tree_entry *root)
1066
if (!c)
1067
die("Corrupt mode in %s", sha1_to_hex(sha1));
1068
e->versions[0].mode = e->versions[1].mode;
1069
- e->name = to_atom(c, (unsigned short)strlen(c));
1069
+ e->name = to_atom(c, strlen(c));
1070
c += e->name->str_len + 1;
1071
hashcpy(e->versions[0].sha1, (unsigned char*)c);
1072
hashcpy(e->versions[1].sha1, (unsigned char*)c);
@@ -1227,7 +1227,7 @@ static int tree_content_set(
1227
if (t->entry_count == t->entry_capacity)
1228
root->tree = t = grow_tree_content(t, t->entry_count);
1229
e = new_tree_entry();
1230
- e->name = to_atom(p, (unsigned short)n);
1230
+ e->name = to_atom(p, n);
1231
e->versions[0].mode = 0;
1232
hashclr(e->versions[0].sha1);
1233
t->entries[t->entry_count++] = e;