CLEANUP: Use the ist() macro whenever possible
Refactoring performed with the following Coccinelle patch:
@@
char *s;
@@
(
- ist2(s, strlen(s))
+ ist(s)
|
- ist2(strdup(s), strlen(s))
+ ist(strdup(s))
)
Note that this replacement is safe even in the strdup() case, because `ist()`
will not call `strlen()` on a `NULL` pointer. Instead is inserts a length of
`0`, effectively resulting in `IST_NULL`.
diff --git a/src/http_ana.c b/src/http_ana.c
index 5536c04..c124544 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -2733,7 +2733,7 @@
/* Do we have a custom reason format string? */
if (!isttest(reason)) {
const char *str = http_get_reason(status);
- reason = ist2(str, strlen(str));
+ reason = ist(str);
}
if (!http_replace_res_status(htx, ist2(trash.area, trash.data), reason))