From: Ralph Corderoy Date: Sat, 10 Dec 2016 14:39:21 +0000 (+0000) Subject: Rename recently added HasSuffix() to has_suffix(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/16959a4f1a98162369b9b0ca9cb890450410f2c7?ds=sidebyside Rename recently added HasSuffix() to has_suffix(). --- diff --git a/h/utils.h b/h/utils.h index 5e1522c6..21988f73 100644 --- a/h/utils.h +++ b/h/utils.h @@ -68,7 +68,7 @@ void trunccpy(char *dst, const char *src, size_t size); #define TRUNCCPY(dst, src) trunccpy(dst, src, sizeof (dst)) bool has_prefix(const char *s, const char *prefix); -bool HasSuffix(const char *s, const char *suffix); +bool has_suffix(const char *s, const char *suffix); bool HasSuffixC(const char *s, int c); void TrimSuffixC(char *s, int c); void ToLower(char *s); diff --git a/sbr/utils.c b/sbr/utils.c index 80c0cd0d..c070dc10 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -383,8 +383,8 @@ bool has_prefix(const char *s, const char *prefix) } -/* HasSuffix returns true if non-NULL s ends with non-NULL suffix. */ -bool HasSuffix(const char *s, const char *suffix) +/* has_suffix returns true if non-NULL s ends with non-NULL suffix. */ +bool has_suffix(const char *s, const char *suffix) { size_t ls, lsuf; diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 553b14e3..2a701f00 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -2589,7 +2589,7 @@ static int fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) { int fixed = 0; - if (has_prefix(value, "=?") && HasSuffix(value, "?=")) { + if (has_prefix(value, "=?") && has_suffix(value, "?=")) { /* Looks like an RFC 2047 encoded parameter. */ char decoded[PATH_MAX + 1];