Code

gitweb: Handle invalid regexp in regexp search
[git.git] / commit.c
index 74d66018800d7a2a2b3a3365e87a23049690da6b..913dbabd1c12772d574f5814f73a12ed6bd4a9da 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -245,10 +245,10 @@ int unregister_shallow(const unsigned char *sha1)
        return 0;
 }
 
-int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
+int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long size)
 {
-       char *tail = buffer;
-       char *bufptr = buffer;
+       const char *tail = buffer;
+       const char *bufptr = buffer;
        unsigned char parent[20];
        struct commit_list **pptr;
        struct commit_graft *graft;
@@ -515,7 +515,7 @@ void sort_in_topological_order(struct commit_list ** list, int lifo)
 
                commit = work_item->item;
                for (parents = commit->parents; parents ; parents = parents->next) {
-                       struct commit *parent=parents->item;
+                       struct commit *parent = parents->item;
 
                        if (!parent->indegree)
                                continue;