commit - f15094901545c7a69c0989c80bc8715829c34db4
commit + 3a3fab296da4c9ccf215db397e56f643a39e9944
blob - a673215a42df4f74a3c93a4b16ba0b6292a5f430
blob + e57f15bdb8c8c4014114be0ac5b8eb26391c82e3
--- mheader.c
+++ mheader.c
char *
osmtpd_mheader_skip_hyphenatedword(char *ptr, int optional)
{
- char *start = ptr, *prev;
- int ishyp = 0;
+ char *start = ptr, *end, *hyphen;
if ((ptr = osmtpd_mheader_skip_alpha(ptr, 0)) == NULL)
return optional ? start : NULL;
- prev = ptr;
+ end = ptr;
while (1) {
if (ptr[0] == '-') {
- ishyp = 1;
+ hyphen = hyphen == NULL ? ptr - 1 : hyphen;
ptr++;
continue;
}
if ((ptr = osmtpd_mheader_skip_alpha(start, 0)) == NULL &&
(ptr = osmtpd_mheader_skip_digit(start, 0)) == NULL)
break;
- ishyp = 0;
- prev = ptr;
+ hyphen = NULL;
+ end = ptr;
}
- return ishyp ? prev : ptr;
+ return hyphen == NULL ? end : hyphen;
}
char *