]> diplodocus.org Git - nmh/commitdiff
Alter HasSuffixC()'s char * to be const.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 23 Oct 2016 11:08:31 +0000 (12:08 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 24 Oct 2016 09:18:55 +0000 (10:18 +0100)
h/utils.h
sbr/utils.c

index 47ae59f0cb064589518d974e0cd5b06e7b65b600..c8384b3921dd7981db70359c80bc8204b3e8c2ef 100644 (file)
--- a/h/utils.h
+++ b/h/utils.h
@@ -64,7 +64,7 @@ char *rfind_str (const char [], size_t, const char *);
 char *nmh_strcasestr (const char *, const char *);
 
 bool HasPrefix(const char *s, const char *prefix);
-bool HasSuffixC(char *s, int c);
+bool HasSuffixC(const char *s, int c);
 void TrimSuffixC(char *s, int c);
 void ToLower(char *s);
 void ToUpper(char *s);
index a6f0e1113a6bc3a7a56a49875a4fd7006c425854..06835d2bfcb57e9487ed478a15a2bcf181af17c0 100644 (file)
@@ -372,7 +372,7 @@ bool HasPrefix(const char *s, const char *prefix)
 
 /* HasSuffixC returns true if non-NULL string s ends with a c before the
  * terminating NUL. */
-bool HasSuffixC(char *s, int c)
+bool HasSuffixC(const char *s, int c)
 {
     return *s && s[strlen(s) - 1] == c;
 }