From a71edf3ba275b946224b5bcded0a8ecfce1855c0 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 30 Oct 2015 10:05:53 +0000 Subject: Standardise our style for checking malloc failures if we have a malloc |x = OPENSSL_malloc(...)| sometimes we check |x| for NULL and sometimes we treat it as a boolean |if(!x) ...|. Standardise the approach in libssl. Reviewed-by: Kurt Roeckx --- ssl/record/rec_layer_d1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ssl/record/rec_layer_d1.c') diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index 0133ae3f18..ebe486e419 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -137,8 +137,8 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) d->processed_rcds.q = pqueue_new(); d->buffered_app_data.q = pqueue_new(); - if (!d->unprocessed_rcds.q || !d->processed_rcds.q - || !d->buffered_app_data.q) { + if (d->unprocessed_rcds.q == NULL || d->processed_rcds.q == NULL + || d->buffered_app_data.q == NULL) { pqueue_free(d->unprocessed_rcds.q); pqueue_free(d->processed_rcds.q); pqueue_free(d->buffered_app_data.q); -- cgit v1.2.3