cgit

commit ccba7eb9d0c43ffe99178ab6632dc3794f887309

Author: Christian Hesse <mail@eworm.de>

global: make 'char *path' const where possible

Signed-off-by: Christian Hesse <mail@eworm.de>

 ui-atom.c | 2 +-
 ui-atom.h | 2 +-
 ui-log.c | 2 +-
 ui-log.h | 2 +-
 ui-refs.c | 2 +-
 ui-repolist.c | 2 +-
 ui-summary.c | 2 +-
 ui-summary.h | 2 +-
 ui-tree.c | 4 ++--


diff --git a/ui-atom.c b/ui-atom.c
index 3866823b4baff1401b65ffb5987fc09e652b2963..cd66f82f082b9cc078584438d7864388e268013c 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -83,7 +83,7 @@ 	cgit_free_commitinfo(info);
 }
 
 
-void cgit_print_atom(char *tip, char *path, int max_count)
+void cgit_print_atom(char *tip, const char *path, int max_count)
 {
 	char *host;
 	const char *argv[] = {NULL, tip, NULL, NULL, NULL};




diff --git a/ui-atom.h b/ui-atom.h
index 749ffd36e0db9be9eaa3e3a31df33339badfedf4..dda953bbf4ff1d079d1ae30e346ee10c69bd3e2e 100644
--- a/ui-atom.h
+++ b/ui-atom.h
@@ -1,6 +1,6 @@
 #ifndef UI_ATOM_H
 #define UI_ATOM_H
 
-extern void cgit_print_atom(char *tip, char *path, int max_count);
+extern void cgit_print_atom(char *tip, const char *path, int max_count);
 
 #endif




diff --git a/ui-log.c b/ui-log.c
index 3bcb657657e47265ffe499910a7508ad9323287f..8c654257b16b926aab928246a0b9e6f98cfbcd06 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -362,7 +362,7 @@ 	return result;
 }
 
 void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern,
-		    char *path, int pager, int commit_graph, int commit_sort)
+		    const char *path, int pager, int commit_graph, int commit_sort)
 {
 	struct rev_info rev;
 	struct commit *commit;




diff --git a/ui-log.h b/ui-log.h
index d324c9284232c3e5ccc1bbcd407fb75551834d3e..325607cdab62d1cdd21ba0514ae395888636cbc6 100644
--- a/ui-log.h
+++ b/ui-log.h
@@ -2,7 +2,7 @@ #ifndef UI_LOG_H
 #define UI_LOG_H
 
 extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep,
-			   char *pattern, char *path, int pager,
+			   char *pattern, const char *path, int pager,
 			   int commit_graph, int commit_sort);
 extern void show_commit_decorations(struct commit *commit);
 




diff --git a/ui-refs.c b/ui-refs.c
index 2ec385854ef9a2396fc10881de5f46599464685e..456f610df41cef1e8b3ebdfd02fd44204a3461d4 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -136,7 +136,7 @@
 	return 0;
 }
 
-static void print_refs_link(char *path)
+static void print_refs_link(const char *path)
 {
 	html("<tr class='nohover'><td colspan='5'>");
 	cgit_refs_link("[...]", NULL, NULL, ctx.qry.head, NULL, path);




diff --git a/ui-repolist.c b/ui-repolist.c
index 41424c0881dee009816a3effc75ef1d116f06955..7cf763891fcc069262476ac9bca153495f907efc 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -11,7 +11,7 @@ #include "ui-repolist.h"
 #include "html.h"
 #include "ui-shared.h"
 
-static time_t read_agefile(char *path)
+static time_t read_agefile(const char *path)
 {
 	time_t result;
 	size_t size;




diff --git a/ui-summary.c b/ui-summary.c
index 8e81ac4e7961558a63ba20ecad55d2e098c3e815..947812a814caff74bab85079ab7559640d7f5753 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -99,7 +99,7 @@
 	return full_path;
 }
 
-void cgit_print_repo_readme(char *path)
+void cgit_print_repo_readme(const char *path)
 {
 	char *filename, *ref, *mimetype;
 	int free_filename = 0;




diff --git a/ui-summary.h b/ui-summary.h
index 089665095ed852a971dc3e9d486cbb0b72a52197..cba696af53af3f6ee843b29ee05a9928ed29a2bf 100644
--- a/ui-summary.h
+++ b/ui-summary.h
@@ -2,6 +2,6 @@ #ifndef UI_SUMMARY_H
 #define UI_SUMMARY_H
 
 extern void cgit_print_summary(void);
-extern void cgit_print_repo_readme(char *path);
+extern void cgit_print_repo_readme(const char *path);
 
 #endif /* UI_SUMMARY_H */




diff --git a/ui-tree.c b/ui-tree.c
index df8ad82ca4914a5b469986545f1543bf1480f511..314ac5299fc5dca99949d2cb24394c52fb2c91d5 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -84,7 +84,7 @@ 	}
 	html("</table>\n");
 }
 
-static void print_object(const struct object_id *oid, char *path, const char *basename, const char *rev)
+static void print_object(const struct object_id *oid, const char *path, const char *basename, const char *rev)
 {
 	enum object_type type;
 	char *buf;
@@ -279,7 +279,7 @@ 	html("\n");
 	cgit_print_layout_end();
 }
 
-static void ls_tree(const struct object_id *oid, char *path, struct walk_tree_context *walk_tree_ctx)
+static void ls_tree(const struct object_id *oid, const char *path, struct walk_tree_context *walk_tree_ctx)
 {
 	struct tree *tree;
 	struct pathspec paths = {