Skip to content

Commit

Permalink
KEYS: remove redundant memset
Browse files Browse the repository at this point in the history
Reviewing use of memset in keyctl_pkey.c

keyctl_pkey_params_get prologue code to set params up

	memset(params, 0, sizeof(*params));
	params->encoding = "raw";

keyctl_pkey_query has the same prologue
and calls keyctl_pkey_params_get.

So remove the prologue.

Signed-off-by: Tom Rix <[email protected]>
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Ben Boeckel <[email protected]>
  • Loading branch information
Tom Rix authored and dhowells committed Jan 21, 2021
1 parent 328c95d commit c224926
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions security/keys/keyctl_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ long keyctl_pkey_query(key_serial_t id,
struct kernel_pkey_query res;
long ret;

memset(&params, 0, sizeof(params));

ret = keyctl_pkey_params_get(id, _info, &params);
if (ret < 0)
goto error;
Expand Down

0 comments on commit c224926

Please sign in to comment.