]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ist: Add istend() function to return a pointer to the end of the string
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Oct 2020 12:37:12 +0000 (14:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Nov 2020 18:25:12 +0000 (19:25 +0100)
istend() is a shortcut to istptr() + istlen().

include/import/ist.h

index 4c8979b423d6dfb2a7d3ce3dad58fdb6cc493a8c..1262e8f5991ce38fad4b140b0b3ac43a55776ae2 100644 (file)
@@ -222,6 +222,12 @@ static inline size_t istlen(const struct ist ist)
        return ist.len;
 }
 
+/* returns the pointer to the end the string */
+static inline char *istend(const struct ist ist)
+{
+       return (ist.ptr + ist.len);
+}
+
 /* skips to next character in the string, always stops at the end */
 static inline struct ist istnext(const struct ist ist)
 {