]> gitweb.ps.run Git - ps-cgit/blobdiff - parsing.c
Remove dead initialization in cgit_parse_commit()
[ps-cgit] / parsing.c
index c9e43509242d1d3a4e6faf85da7ce46375659ab3..602e3de799469ebe8900ee3928638fcac7e850df 100644 (file)
--- a/parsing.c
+++ b/parsing.c
@@ -103,7 +103,10 @@ const char *reencode(char **txt, const char *src_enc, const char *dst_enc)
 {
        char *tmp;
 
-       if (!txt || !*txt || !src_enc || !dst_enc)
+       if (!txt)
+               return NULL;
+
+       if (!*txt || !src_enc || !dst_enc)
                return *txt;
 
        /* no encoding needed if src_enc equals dst_enc */
@@ -122,7 +125,7 @@ const char *reencode(char **txt, const char *src_enc, const char *dst_enc)
 struct commitinfo *cgit_parse_commit(struct commit *commit)
 {
        struct commitinfo *ret;
-       char *p = commit->buffer, *t = commit->buffer;
+       char *p = commit->buffer, *t;
 
        ret = xmalloc(sizeof(*ret));
        ret->commit = commit;