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/listener.c b/src/listener.c
index 48ba8e0..400a7eb 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -1496,7 +1496,7 @@
return ERR_ALERT | ERR_FATAL;
}
- proto = ist2(args[cur_arg + 1], strlen(args[cur_arg + 1]));
+ proto = ist(args[cur_arg + 1]);
conf->mux_proto = get_mux_proto(proto);
if (!conf->mux_proto) {
memprintf(err, "'%s' : unknown MUX protocol '%s'", args[cur_arg], args[cur_arg+1]);