struct mailmap_entry *me;
struct string_list_item *item;
- if (old_email == NULL) {
+ if (!old_email) {
old_email = new_email;
new_email = NULL;
}
item->util = me;
}
- if (old_name == NULL) {
+ if (!old_name) {
debug_mm("mailmap: adding (simple) entry for '%s'\n", old_email);
/* Replace current name and new email for simple entry */
char *left, *right, *nstart, *nend;
*name = *email = NULL;
- if ((left = strchr(buffer, '<')) == NULL)
+ if (!(left = strchr(buffer, '<')))
return NULL;
- if ((right = strchr(left+1, '>')) == NULL)
+ if (!(right = strchr(left + 1, '>')))
return NULL;
if (!allow_empty_email && (left+1 == right))
return NULL;
if (buffer[0] == '#')
return;
- if ((name2 = parse_name_and_email(buffer, &name1, &email1, 0)) != NULL)
+ if ((name2 = parse_name_and_email(buffer, &name1, &email1, 0)))
parse_name_and_email(name2, &name2, &email2, 1);
if (email1)
(int)*emaillen, debug_str(*email));
item = lookup_prefix(map, *email, *emaillen);
- if (item != NULL) {
+ if (item) {
me = (struct mailmap_entry *)item->util;
if (me->namemap.nr) {
/*
item = subitem;
}
}
- if (item != NULL) {
+ if (item) {
struct mailmap_info *mi = (struct mailmap_info *)item->util;
if (mi->name == NULL && mi->email == NULL) {
debug_mm("map_user: -- (no simple mapping)\n");