From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Tue, 23 Dec 2014 18:57:45 -0700 Subject: [PATCH] Use split_ident_line() in parse_user() In-Reply-To: <1418818761-17947-1-git-send-email-cgit@cryptocrack.de> References: <1418818761-17947-1-git-send-email-cgit@cryptocrack.de> Message-ID: On Wed, Dec 17, 2014 at 5:19 AM, Lukas Fleischer wrote: > Use Git's built-in ident line splitting algorithm instead of > reimplementing it. This does not only simplify the code but also makes > sure that cgit is consistent with Git when it comes to author parsing. > Thank heavens! > + email_len = ident.mail_end - ident.mail_begin; > + *email = xmalloc(strlen("<") + email_len + strlen(">\0")); > + sprintf(*email, "<%.*s>", email_len, ident.mail_begin); > + > strlen(">\0") -- isn't the null superfluous? Cleanup and resubmit? -------------- next part -------------- An HTML attachment was scrubbed... URL: