global: make 'char *path' const where possible
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
54c407a74a
commit
ccba7eb9d0
@ -83,7 +83,7 @@ static void add_entry(struct commit *commit, const char *host)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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;
|
char *host;
|
||||||
const char *argv[] = {NULL, tip, NULL, NULL, NULL};
|
const char *argv[] = {NULL, tip, NULL, NULL, NULL};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#ifndef UI_ATOM_H
|
#ifndef UI_ATOM_H
|
||||||
#define 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
|
#endif
|
||||||
|
2
ui-log.c
2
ui-log.c
@ -362,7 +362,7 @@ static char *next_token(char **src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern,
|
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 rev_info rev;
|
||||||
struct commit *commit;
|
struct commit *commit;
|
||||||
|
2
ui-log.h
2
ui-log.h
@ -2,7 +2,7 @@
|
|||||||
#define UI_LOG_H
|
#define UI_LOG_H
|
||||||
|
|
||||||
extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep,
|
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);
|
int commit_graph, int commit_sort);
|
||||||
extern void show_commit_decorations(struct commit *commit);
|
extern void show_commit_decorations(struct commit *commit);
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ static int print_tag(struct refinfo *ref)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_refs_link(char *path)
|
static void print_refs_link(const char *path)
|
||||||
{
|
{
|
||||||
html("<tr class='nohover'><td colspan='5'>");
|
html("<tr class='nohover'><td colspan='5'>");
|
||||||
cgit_refs_link("[...]", NULL, NULL, ctx.qry.head, NULL, path);
|
cgit_refs_link("[...]", NULL, NULL, ctx.qry.head, NULL, path);
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "html.h"
|
#include "html.h"
|
||||||
#include "ui-shared.h"
|
#include "ui-shared.h"
|
||||||
|
|
||||||
static time_t read_agefile(char *path)
|
static time_t read_agefile(const char *path)
|
||||||
{
|
{
|
||||||
time_t result;
|
time_t result;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
@ -99,7 +99,7 @@ static char* append_readme_path(const char *filename, const char *ref, const cha
|
|||||||
return full_path;
|
return full_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cgit_print_repo_readme(char *path)
|
void cgit_print_repo_readme(const char *path)
|
||||||
{
|
{
|
||||||
char *filename, *ref, *mimetype;
|
char *filename, *ref, *mimetype;
|
||||||
int free_filename = 0;
|
int free_filename = 0;
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
#define UI_SUMMARY_H
|
#define UI_SUMMARY_H
|
||||||
|
|
||||||
extern void cgit_print_summary(void);
|
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 */
|
#endif /* UI_SUMMARY_H */
|
||||||
|
@ -84,7 +84,7 @@ static void print_binary_buffer(char *buf, unsigned long size)
|
|||||||
html("</table>\n");
|
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;
|
enum object_type type;
|
||||||
char *buf;
|
char *buf;
|
||||||
@ -279,7 +279,7 @@ static void ls_tail(void)
|
|||||||
cgit_print_layout_end();
|
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 tree *tree;
|
||||||
struct pathspec paths = {
|
struct pathspec paths = {
|
||||||
|
Loading…
Reference in New Issue
Block a user