X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fhtml.c;h=a4716656b4e1ef67c2b9fa91f2af8b6e0b25c74a;hb=c9ae4ae075de3815f814dbf48d2336cf536de42c;hp=8a1252490addd9d758f9951f99dd5febb77dcf8f;hpb=33e668c4571e06effe56eaa7dc5884412a2707d2;p=ppastats.git diff --git a/src/html.c b/src/html.c index 8a12524..a471665 100644 --- a/src/html.c +++ b/src/html.c @@ -88,7 +88,7 @@ static char *get_header(const char *title, const char *script) if (res != tmp) free(tmp); - + return res; } @@ -470,22 +470,20 @@ version_to_html(struct ppa_stats *ppa, return ; } - f_name = malloc(strlen(pkg->name)+1+strlen(version->version)+1); sprintf(f_name, "%s_%s", pkg->name, version->version); path = path_new(dir, f_name, ".html"); script_tpl = "var data = %s;\n ppastats_ver();"; - script = malloc(strlen(script_tpl) - 2 +strlen(json) + 1); + script = malloc(strlen(script_tpl) - 2 + strlen(json) + 1); sprintf(script, script_tpl, json); - + create_html(path, f_name, body, script); - + free(json); free(path); free(f_name); - } static void