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/server.c b/src/server.c
index b6a1bc2..d570e67 100644
--- a/src/server.c
+++ b/src/server.c
@@ -551,7 +551,7 @@
memprintf(err, "'%s' : missing value", args[*cur_arg]);
return ERR_ALERT | ERR_FATAL;
}
- proto = ist2(args[*cur_arg + 1], strlen(args[*cur_arg + 1]));
+ proto = ist(args[*cur_arg + 1]);
newsrv->mux_proto = get_mux_proto(proto);
if (!newsrv->mux_proto) {
memprintf(err, "'%s' : unknown MUX protocol '%s'", args[*cur_arg], args[*cur_arg+1]);