aboutsummaryrefslogtreecommitdiff
path: root/crypto/engine/eng_ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/engine/eng_ctrl.c')
-rw-r--r--crypto/engine/eng_ctrl.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/crypto/engine/eng_ctrl.c b/crypto/engine/eng_ctrl.c
index 5d7e15634e6e..226dd5e2e7bf 100644
--- a/crypto/engine/eng_ctrl.c
+++ b/crypto/engine/eng_ctrl.c
@@ -62,7 +62,7 @@ static int int_ctrl_cmd_by_num(const ENGINE_CMD_DEFN *defn, unsigned int num)
}
static int int_ctrl_helper(ENGINE *e, int cmd, long i, void *p,
- void (*f) (void))
+ void (*f)(void))
{
int idx;
char *s = (char *)p;
@@ -75,9 +75,7 @@ static int int_ctrl_helper(ENGINE *e, int cmd, long i, void *p,
return e->cmd_defns->cmd_num;
}
/* One or two commands require that "p" be a valid string buffer */
- if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) ||
- (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) ||
- (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
+ if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
if (s == NULL) {
ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
return -1;
@@ -115,8 +113,7 @@ static int int_ctrl_helper(ENGINE *e, int cmd, long i, void *p,
return strlen(cdp->cmd_desc == NULL ? int_no_description
: cdp->cmd_desc);
case ENGINE_CTRL_GET_DESC_FROM_CMD:
- return strlen(strcpy(s, cdp->cmd_desc == NULL ? int_no_description
- : cdp->cmd_desc));
+ return strlen(strcpy(s, cdp->cmd_desc == NULL ? int_no_description : cdp->cmd_desc));
case ENGINE_CTRL_GET_CMD_FLAGS:
return cdp->cmd_flags;
}
@@ -125,7 +122,7 @@ static int int_ctrl_helper(ENGINE *e, int cmd, long i, void *p,
return -1;
}
-int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
+int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
{
int ctrl_exists, ref_exists;
if (e == NULL) {
@@ -181,20 +178,17 @@ int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
int ENGINE_cmd_is_executable(ENGINE *e, int cmd)
{
int flags;
- if ((flags =
- ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FLAGS, cmd, NULL, NULL)) < 0) {
+ if ((flags = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FLAGS, cmd, NULL, NULL)) < 0) {
ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NUMBER);
return 0;
}
- if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) &&
- !(flags & ENGINE_CMD_FLAG_NUMERIC) &&
- !(flags & ENGINE_CMD_FLAG_STRING))
+ if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
return 0;
return 1;
}
int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
- long i, void *p, void (*f) (void), int cmd_optional)
+ long i, void *p, void (*f)(void), int cmd_optional)
{
int num;
@@ -204,7 +198,8 @@ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
}
if (e->ctrl == NULL
|| (num = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FROM_NAME,
- 0, (void *)cmd_name, NULL)) <= 0) {
+ 0, (void *)cmd_name, NULL))
+ <= 0) {
/*
* If the command didn't *have* to be supported, we fake success.
* This allows certain settings to be specified for multiple ENGINEs
@@ -230,7 +225,7 @@ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
}
int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
- int cmd_optional)
+ int cmd_optional)
{
int num, flags;
long l;
@@ -242,7 +237,8 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
}
if (e->ctrl == NULL
|| (num = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FROM_NAME,
- 0, (void *)cmd_name, NULL)) <= 0) {
+ 0, (void *)cmd_name, NULL))
+ <= 0) {
/*
* If the command didn't *have* to be supported, we fake success.
* This allows certain settings to be specified for multiple ENGINEs