Commit Diff


commit - 17d6446ae871d15954803d493cdcc3e9dd968e2c
commit + fa8129f71e6d8a352929f74ba0fc4f8aa59ba216
blob - 94c78de2912607266c112dcb798d6716f12582e7
blob + 8ee216a9d5d714285144835acdb79203d3a6bd46
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -250,7 +250,7 @@ enum gw_query_actions {
 	GW_TREE,
 };
 
-static struct gw_query_action gw_query_funcs[] = {
+static const struct gw_query_action gw_query_funcs[] = {
 	{ GW_BLAME,	"blame",	gw_blame,	"gw_tmpl/blame.tmpl" },
 	{ GW_BLOB,	"blob",		NULL,		NULL },
 	{ GW_BRIEFS,	"briefs",	gw_briefs,	"gw_tmpl/briefs.tmpl" },
@@ -2021,7 +2021,7 @@ gw_parse_querystring(struct gw_trans *gw_trans)
 {
 	const struct got_error *error = NULL;
 	struct kpair *p;
-	struct gw_query_action *action = NULL;
+	const struct gw_query_action *action = NULL;
 	unsigned int i;
 
 	if (gw_trans->gw_req->fieldnmap[0]) {
blob - d5520525766e78cecee67d07825051e7b8848320
blob + a12d6573a21a474223623b12bb887779abb59922
--- lib/deltify.c
+++ lib/deltify.c
@@ -39,7 +39,7 @@
  * https://www.usenix.org/conference/atc16/technical-sessions/presentation/xia
  */
 
-static uint32_t geartab[256] = {
+static const uint32_t geartab[256] = {
     0x67ed26b7, 0x32da500c, 0x53d0fee0, 0xce387dc7, 0xcd406d90, 0x2e83a4d4,
     0x9fc9a38d, 0xb67259dc, 0xca6b1722, 0x6d2ea08c, 0x235cea2e, 0x3149bb5f,
     0x1beda787, 0x2a6b77d5, 0x2f22d9ac, 0x91fc0544, 0xe413acfa, 0x5a30ff7a,
blob - 3d143bdd6ada0816b1c74946f0824dd087cddc0d
blob + 5fe156dbd73077d7944f6b4957fe5738227792cb
--- libexec/got-send-pack/got-send-pack.c
+++ libexec/got-send-pack/got-send-pack.c
@@ -336,7 +336,7 @@ send_pack(int fd, struct got_pathlist_head *refs,
 {
 	const struct got_error *err = NULL;
 	char buf[GOT_PKT_MAX];
-	unsigned char zero_id[SHA1_DIGEST_LENGTH] = { 0 };
+	const unsigned char zero_id[SHA1_DIGEST_LENGTH] = { 0 };
 	char old_hashstr[SHA1_DIGEST_STRING_LENGTH];
 	char new_hashstr[SHA1_DIGEST_STRING_LENGTH];
 	struct got_pathlist_head their_refs;
blob - fcbe2c0855cdccdfd3b551ae89bcec14ffeaa248
blob + 3b6b62d13199064f323556a0aa75472aa185daa9
--- regress/delta/delta_test.c
+++ regress/delta/delta_test.c
@@ -32,7 +32,7 @@
 #define nitems(_a) (sizeof(_a) / sizeof((_a)[0]))
 #endif
 
-struct delta_test {
+const struct delta_test {
 	const char *base;
 	size_t base_len;
 	const char *delta;
@@ -66,7 +66,7 @@ delta_apply(void)
 		return 1;
 
 	for (i = 0; i < nitems(delta_tests); i++) {
-		struct delta_test *dt = &delta_tests[i];
+		const struct delta_test *dt = &delta_tests[i];
 		FILE *base_file;
 		char buf[1024];
 		size_t n, result_len;
blob - d4b990cae39ace16ca2ade92e3654f6d6466c606
blob + 62e7bd4abb455803dad6f0701238c9271478d349
--- regress/fetch/fetch_test.c
+++ regress/fetch/fetch_test.c
@@ -60,7 +60,7 @@ static int
 fetch_parse_uri(void)
 {
 	const struct got_error *err = NULL;
-	struct parse_uri_test {
+	const struct parse_uri_test {
 		const char *uri;
 		const char *proto;
 		const char *host;
blob - da527ce4cd11db7b8e05e2b3bec1039d48bba44e
blob + 425a9edc3c68e6b156add5769aa1cc51cde35345
--- regress/path/path_test.c
+++ regress/path/path_test.c
@@ -48,7 +48,7 @@ test_printf(char *fmt, ...)
 static int
 path_cmp(void)
 {
-	struct path_cmp_test {
+	const struct path_cmp_test {
 		const char *path1;
 		const char *path2;
 		int expected;