From d40eeff7279686a50acb5f9dd3bb12549cdd6980 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Tue, 5 Jan 2021 18:36:23 +0000 Subject: Avoid local variable in tls13_secret_init(). suggested by jsing --- lib/libssl/tls13_key_schedule.c | 8 ++------ 1 file 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 * @@ -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; -- cgit v1.2.3