diff options
author | Stef Walter <stef@thewalter.net> | 2014-08-11 10:17:30 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2014-08-11 10:17:30 +0200 |
commit | ea39cf40a881fd28f86e2625dff80fde58f2e08a (patch) | |
tree | 018ff76f6ad891cca8133b19343a67aa550a68dc | |
parent | a7b012fcfa4fd0c1c53de3006a63a8bad4a08041 (diff) |
p11-kit: Fix various noise/issues highlighted by clang
-rw-r--r-- | p11-kit/modules.c | 1 | ||||
-rw-r--r-- | p11-kit/remote.c | 3 | ||||
-rw-r--r-- | p11-kit/rpc-client.c | 4 | ||||
-rw-r--r-- | p11-kit/rpc-server.c | 18 |
4 files changed, 13 insertions, 13 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c index ce0fb96..bc6f768 100644 --- a/p11-kit/modules.c +++ b/p11-kit/modules.c @@ -511,7 +511,6 @@ take_config_and_load_module_inlock (char **name, if (isolated) { if (remote) { p11_message ("ignoring 'isolated' on module '%s' because 'remote' is set", *name); - isolated = false; } else { if (asprintf (&value, "|" BINDIR "/p11-kit remote '%s'", filename) < 0) return_val_if_reached (CKR_DEVICE_ERROR); diff --git a/p11-kit/remote.c b/p11-kit/remote.c index 706d8b8..944e501 100644 --- a/p11-kit/remote.c +++ b/p11-kit/remote.c @@ -72,8 +72,7 @@ p11_kit_remote_serve_module (CK_FUNCTION_LIST *module, switch (read (in_fd, &version, 1)) { case 0: - status = P11_RPC_EOF; - break; + goto out; case 1: if (version != 0) { p11_message ("unspported version received: %d", (int)version); diff --git a/p11-kit/rpc-client.c b/p11-kit/rpc-client.c index 810ef12..23cfcfc 100644 --- a/p11-kit/rpc-client.c +++ b/p11-kit/rpc-client.c @@ -198,8 +198,8 @@ proto_read_attribute_array (p11_rpc_message *msg, { uint32_t i, num, value, type; CK_ATTRIBUTE_PTR attr; - const unsigned char *attrval; - size_t attrlen; + const unsigned char *attrval = NULL; + size_t attrlen = 0; unsigned char validity; CK_RV ret; diff --git a/p11-kit/rpc-server.c b/p11-kit/rpc-server.c index a468e7a..b8288c9 100644 --- a/p11-kit/rpc-server.c +++ b/p11-kit/rpc-server.c @@ -681,16 +681,18 @@ rpc_C_Initialize (CK_X_FUNCTION_LIST *self, assert (p11_rpc_message_is_verified (msg)); } - memset (&init_args, 0, sizeof (init_args)); - init_args.flags = CKF_OS_LOCKING_OK; + if (ret == CKR_OK) { + memset (&init_args, 0, sizeof (init_args)); + init_args.flags = CKF_OS_LOCKING_OK; - func = self->C_Initialize; - assert (func != NULL); - ret = (func) (self, &init_args); + func = self->C_Initialize; + assert (func != NULL); + ret = (func) (self, &init_args); - /* Empty response */ - if (ret == CKR_OK) - ret = call_ready (msg); + /* Empty response */ + if (ret == CKR_OK) + ret = call_ready (msg); + } p11_debug ("ret: %d", (int)ret); return ret; |