diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:10:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:10:51 -0800 |
commit | c444c16589f95ac22d8e3ffe603cd7f0613512ce (patch) | |
tree | 31d2e0c2a77344201af6f3ee5427f47218dec9bb /mailmap.c | |
parent | 77f143bf3e218857ec8e5244d7e862e8e0c1a041 (diff) | |
parent | 81b50f3ce40bfdd66e5d967bf82be001039a9a98 (diff) | |
download | git-ly/mktree-using-strbuf.tar.gz |
Merge "Move 'builtin-*' into a 'builtin/' subdirectory"ly/mktree-using-strbuf
Diffstat (limited to 'mailmap.c')
-rw-r--r-- | mailmap.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -103,7 +103,7 @@ static char *parse_name_and_email(char *buffer, char **name, char **email, int allow_empty_email) { char *left, *right, *nstart, *nend; - *name = *email = 0; + *name = *email = NULL; if ((left = strchr(buffer, '<')) == NULL) return NULL; @@ -136,7 +136,7 @@ static int read_single_mailmap(struct string_list *map, const char *filename, ch if (f == NULL) return 1; while (fgets(buffer, sizeof(buffer), f) != NULL) { - char *name1 = 0, *email1 = 0, *name2 = 0, *email2 = 0; + char *name1 = NULL, *email1 = NULL, *name2 = NULL, *email2 = NULL; if (buffer[0] == '#') { static const char abbrev[] = "# repo-abbrev:"; int abblen = sizeof(abbrev) - 1; @@ -200,7 +200,7 @@ int map_user(struct string_list *map, if (!p) { /* email passed in might not be wrapped in <>, but end with a \0 */ p = memchr(email, '\0', maxlen_email); - if (p == 0) + if (!p) return 0; } if (p - email + 1 < sizeof(buf)) @@ -243,8 +243,3 @@ int map_user(struct string_list *map, debug_mm("map_user: --\n"); return 0; } - -int map_email(struct string_list *map, const char *email, char *name, int maxlen) -{ - return map_user(map, (char *)email, 0, name, maxlen); -} |