Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1745906421, "reponame":"cgit", "desc":"CGI gitweb", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/cgit", "f":3, "items": [ {"schema":"libjg2-1", "cid":"bdab9a0a6c4e1620b61a72ef38b90e9d", "commit": {"type":"commit", "time": 1530120496, "time_ofs": 120, "oid_tree": { "oid": "e382956cf34eade40b62ece2e77f34f0a6696ad8", "alias": []}, "oid":{ "oid": "c4fbb99cee30fa295e240b429b2dc7e8ad83d535", "alias": [ "refs/heads/origin/master"]}, "msg": "Use string list strdup_strings for mimetypes", "sig_commit": { "git_time": { "time": 1530120496, "offset": 120 }, "name": "Jason A. Donenfeld", "email": "Jason@zx2c4.com", "md5": "689e78dac56e3d77d7f74984912487d3" }, "sig_author": { "git_time": { "time": 1529489529, "offset": 480 }, "name": "John Keeping", "email": "john@keeping.me.uk", "md5": "aea7d8738c91da1cb0dfa9d86f2bbc47" }}, "body": "Use string list strdup_strings for mimetypes\n\nThere's no need to do this manually with the string list API will do it\nfor us.\n\nSigned-off-by: John Keeping \u003cjohn@keeping.me.uk\u003e\n" , "diff": "diff --git a/cgit.c b/cgit.c\nindex 223dfc8..0c9f3e9 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -23,7 +23,7 @@ static void add_mimetype(const char *name, const char *value)\n {\n \tstruct string_list_item *item;\n \n-\titem \u003d string_list_insert(\u0026ctx.cfg.mimetypes, xstrdup(name));\n+\titem \u003d string_list_insert(\u0026ctx.cfg.mimetypes, name);\n \titem-\u003eutil \u003d xstrdup(value);\n }\n \n@@ -414,7 +414,7 @@ static void prepare_context(void)\n \tctx.page.modified \u003d time(NULL);\n \tctx.page.expires \u003d ctx.page.modified;\n \tctx.page.etag \u003d NULL;\n-\tmemset(\u0026ctx.cfg.mimetypes, 0, sizeof(struct string_list));\n+\tstring_list_init(\u0026ctx.cfg.mimetypes, 1);\n \tif (ctx.env.script_name)\n \t\tctx.cfg.script_name \u003d xstrdup(ctx.env.script_name);\n \tif (ctx.env.query_string)\n","s":{"c":1745591670,"u": 1094}} ],"g": 522,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}