t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
[gitweb.git] / split-index.c
index 21485e20665979458fb794ee4c3cc77c27032fa8..968b780a06d1f17b190395f06f78fc3124fcf445 100644 (file)
@@ -41,13 +41,6 @@ int read_link_extension(struct index_state *istate,
        return 0;
 }
 
-static int write_strbuf(void *user_data, const void *data, size_t len)
-{
-       struct strbuf *sb = user_data;
-       strbuf_add(sb, data, len);
-       return len;
-}
-
 int write_link_extension(struct strbuf *sb,
                         struct index_state *istate)
 {
@@ -55,8 +48,8 @@ int write_link_extension(struct strbuf *sb,
        strbuf_add(sb, si->base_sha1, 20);
        if (!si->delete_bitmap && !si->replace_bitmap)
                return 0;
-       ewah_serialize_to(si->delete_bitmap, write_strbuf, sb);
-       ewah_serialize_to(si->replace_bitmap, write_strbuf, sb);
+       ewah_serialize_strbuf(si->delete_bitmap, sb);
+       ewah_serialize_strbuf(si->replace_bitmap, sb);
        return 0;
 }