]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-for-each-ref.c
Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall
[thirdparty/git.git] / builtin-for-each-ref.c
index 91e8f95fd20215cae72e206a691370c71dbc575e..d091e04af9549b70a1e15a4b845383056e71932e 100644 (file)
@@ -339,8 +339,11 @@ static const char *copy_name(const char *buf)
 static const char *copy_email(const char *buf)
 {
        const char *email = strchr(buf, '<');
-       const char *eoemail = strchr(email, '>');
-       if (!email || !eoemail)
+       const char *eoemail;
+       if (!email)
+               return "";
+       eoemail = strchr(email, '>');
+       if (!eoemail)
                return "";
        return xmemdupz(email, eoemail + 1 - email);
 }