From 20077c1429915b2c223e4d179a033f2b1806872c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 5 Aug 2017 17:50:35 +0200 Subject: libbb: make trim() return pointer to terminating NUL function old new delta trim 80 90 +10 angle_address 56 50 -6 sysctl_main 282 273 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: +10/-15) Total: -5 bytes Signed-off-by: Denys Vlasenko --- mailutils/sendmail.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mailutils') diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c index 346de2712..65895f0ec 100644 --- a/mailutils/sendmail.c +++ b/mailutils/sendmail.c @@ -166,9 +166,8 @@ static char *angle_address(char *str) { char *s, *e; - trim(str); - e = last_char_is(str, '>'); - if (e) { + e = trim(str); + if (e != str && e[-1] == '>') { s = strrchr(str, '<'); if (s) { *e = '\0'; -- cgit v1.2.3