strstr() is used to match multiple characters in the haystack,
whereas strchr() is used to matched only single character.
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23347)
cmd = sk_OPENSSL_STRING_value(cmds, loop);
res = 1; /* assume success */
/* Check if this command has no ":arg" */
- if ((arg = strstr(cmd, ":")) == NULL) {
+ if ((arg = strchr(cmd, ':')) == NULL) {
if (!ENGINE_ctrl_cmd_string(e, cmd, NULL, 0))
res = 0;
} else {
len = strlen(filename);
rsize = len + 1;
- transform = (strstr(filename, "/") == NULL);
+ transform = (strchr(filename, '/') == NULL);
if (transform) {
/* We will convert this to "%s.s?" or "lib%s.s?" */
rsize += strlen(DSO_EXTENSION); /* The length of ".s?" */
len = strlen(filename);
rsize = len + 1;
- transform = (strstr(filename, "/") == NULL);
+ transform = (strchr(filename, '/') == NULL);
if (transform) {
/* We will convert this to "%s.so" or "lib%s.so" etc */
rsize += strlen(DSO_EXTENSION); /* The length of ".so" */
return 1;
/* ECDHParameters accepts a single group name */
- if (strstr(value, ":") != NULL)
+ if (strchr(value, ':') != NULL)
return 0;
if (cctx->ctx)