diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-02 15:07:20 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-02 15:07:20 -0800 |
commit | ff41848e999fe89600ac0b669b59ad580401f451 (patch) | |
tree | bace34c637fb3dec1580d5e01820b4d9ef070e60 /mailinfo.c | |
parent | Merge branch 'es/worktree-cleanup' (diff) | |
parent | use strpbrk(3) to search for characters from a given set (diff) | |
download | tgif-ff41848e999fe89600ac0b669b59ad580401f451.tar.xz |
Merge branch 'rs/micro-cleanups'
Code cleanup.
* rs/micro-cleanups:
use strpbrk(3) to search for characters from a given set
quote: use isalnum() to check for alphanumeric characters
Diffstat (limited to 'mailinfo.c')
-rw-r--r-- | mailinfo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mailinfo.c b/mailinfo.c index cf92255515..742fa376ab 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -19,8 +19,7 @@ static void cleanup_space(struct strbuf *sb) static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email) { struct strbuf *src = name; - if (name->len < 3 || 60 < name->len || strchr(name->buf, '@') || - strchr(name->buf, '<') || strchr(name->buf, '>')) + if (name->len < 3 || 60 < name->len || strpbrk(name->buf, "@<>")) src = email; else if (name == out) return; |