diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 10:05:53 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (patch) | |
tree | 85257ad90882fc4d8d8f73cd91a03b7cc476b9d2 /ssl/record/rec_layer_d1.c | |
parent | 3457e7a087a643cb65d67d9d72ec5983a02f5dfe (diff) |
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 <kurt@openssl.org>
Diffstat (limited to 'ssl/record/rec_layer_d1.c')
-rw-r--r-- | ssl/record/rec_layer_d1.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |