summaryrefslogtreecommitdiff
path: root/lib/libssl/tls13_key_schedule.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-01-05 18:36:23 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-01-05 18:36:23 +0000
commitd40eeff7279686a50acb5f9dd3bb12549cdd6980 (patch)
tree5ea3b1539d6d2784496a3d6dbbbb2535c19f644e /lib/libssl/tls13_key_schedule.c
parent98145e6dc70f03bcf62d730eaacdc06ab21961b7 (diff)
Avoid local variable in tls13_secret_init().
suggested by jsing
Diffstat (limited to 'lib/libssl/tls13_key_schedule.c')
-rw-r--r--lib/libssl/tls13_key_schedule.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libssl/tls13_key_schedule.c b/lib/libssl/tls13_key_schedule.c
index 2b236ee1132..bb96cf3dd85 100644
--- a/lib/libssl/tls13_key_schedule.c
+++ b/lib/libssl/tls13_key_schedule.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_key_schedule.c,v 1.13 2021/01/05 17:46:32 tb Exp $ */
+/* $OpenBSD: tls13_key_schedule.c,v 1.14 2021/01/05 18:36:22 tb Exp $ */
/*
* Copyright (c) 2018, Bob Beck <beck@openbsd.org>
*
@@ -26,15 +26,11 @@
int
tls13_secret_init(struct tls13_secret *secret, size_t len)
{
- uint8_t *data;
-
if (secret->data != NULL)
return 0;
- if ((data = calloc(1, len)) == NULL)
+ if ((secret->data = calloc(1, len)) == NULL)
return 0;
-
- secret->data = data;
secret->len = len;
return 1;