commit - 46ebad135d9dc52eb84d6985393298465fa7b3ff
commit + d58ddaf3fc10239711ae7a88664e3a100567ba3c
blob - ec7d4be738eed407bdd0ad0b89f270f2dc05237f
blob + 3d41e56213bc4d3fd6b1706e030dcca8520d7b4f
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
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" },
{
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 - 3580b0e0d35257395481742823e17c91ea06d00c
blob + b3bbf0b189575c109c8b935c3519ade298fed3aa
--- lib/deltify.c
+++ lib/deltify.c
* 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 - 11c0b2dbe393420ad16b7edafd58d2091f9c1c8e
blob + e3a4b185b73dabfec5854af9ec5c835f0a9c610d
--- libexec/got-send-pack/got-send-pack.c
+++ libexec/got-send-pack/got-send-pack.c
{
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 - 984dc73376528f545472d7e802bb1dc495fb001d
blob + 377ea9cd19e22c07f1348e7110a49defd8cb974d
--- regress/delta/delta_test.c
+++ regress/delta/delta_test.c
#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;
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 - 4afec393aaf467cb872d53e452b471df35ae6c9b
blob + 5077275c15513b4be193788a5f50ce0fff48b24a
--- regress/fetch/fetch_test.c
+++ regress/fetch/fetch_test.c
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 - cb17e05405edca193cab8ab4da47e83af9ed79a6
blob + 76b5b1f6f53409fd36f72543864785faa2adb4bc
--- regress/path/path_test.c
+++ regress/path/path_test.c
static int
path_cmp(void)
{
- struct path_cmp_test {
+ const struct path_cmp_test {
const char *path1;
const char *path2;
int expected;