From: doug Date: Wed, 29 Apr 2015 02:11:09 +0000 (+0000) Subject: Add whitespace and replace OPENSSL_free with free in documentation. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1f70f88b1a9f455feaefec8778a056e21b33cad0;p=openbsd Add whitespace and replace OPENSSL_free with free in documentation. ok jsing@ --- diff --git a/lib/libssl/bs_ber.c b/lib/libssl/bs_ber.c index 1dde38264e3..2ec91fc8008 100644 --- a/lib/libssl/bs_ber.c +++ b/lib/libssl/bs_ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_ber.c,v 1.3 2015/04/29 01:31:39 doug Exp $ */ +/* $OpenBSD: bs_ber.c,v 1.4 2015/04/29 02:11:09 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -54,7 +54,7 @@ cbs_find_ber(CBS *orig_in, char *ber_found, unsigned depth) return 0; if (CBS_len(&contents) == header_len && header_len > 0 && - CBS_data(&contents)[header_len-1] == 0x80) { + CBS_data(&contents)[header_len - 1] == 0x80) { *ber_found = 1; return 1; } diff --git a/lib/libssl/bs_cbs.c b/lib/libssl/bs_cbs.c index 0237f736819..4c1bfa32881 100644 --- a/lib/libssl/bs_cbs.c +++ b/lib/libssl/bs_cbs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_cbs.c,v 1.6 2015/04/29 01:27:34 doug Exp $ */ +/* $OpenBSD: bs_cbs.c,v 1.7 2015/04/29 02:11:09 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -84,7 +84,7 @@ int CBS_strdup(const CBS *cbs, char **out_ptr) { free(*out_ptr); - *out_ptr = strndup((const char*)cbs->data, cbs->len); + *out_ptr = strndup((const char *)cbs->data, cbs->len); return (*out_ptr != NULL); } @@ -251,7 +251,7 @@ CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, /* Length should have used short-form encoding. */ return 0; - if ((len32 >> ((num_bytes-1)*8)) == 0) + if ((len32 >> ((num_bytes - 1) * 8)) == 0) /* Length should have been at least one byte shorter. */ return 0; diff --git a/lib/libssl/bytestring.h b/lib/libssl/bytestring.h index 93c3df6f107..c2b94c31a24 100644 --- a/lib/libssl/bytestring.h +++ b/lib/libssl/bytestring.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bytestring.h,v 1.4 2015/02/07 06:10:32 doug Exp $ */ +/* $OpenBSD: bytestring.h,v 1.5 2015/04/29 02:11:09 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -68,8 +68,8 @@ size_t CBS_len(const CBS *cbs); /* * CBS_stow copies the current contents of |cbs| into |*out_ptr| and * |*out_len|. If |*out_ptr| is not NULL, the contents are freed with - * OPENSSL_free. It returns one on success and zero on allocation failure. On - * success, |*out_ptr| should be freed with OPENSSL_free. If |cbs| is empty, + * free. It returns one on success and zero on allocation failure. On + * success, |*out_ptr| should be freed with free. If |cbs| is empty, * |*out_ptr| will be NULL. */ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); @@ -77,8 +77,8 @@ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); /* * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed - * with OPENSSL_free. It returns one on success and zero on allocation - * failure. On success, |*out_ptr| should be freed with OPENSSL_free. + * with free. It returns one on success and zero on allocation + * failure. On success, |*out_ptr| should be freed with free. * * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. @@ -335,7 +335,7 @@ void CBB_cleanup(CBB *cbb); * CBB_finish completes any pending length prefix and sets |*out_data| to a * malloced buffer and |*out_len| to the length of that buffer. The caller * takes ownership of the buffer and, unless the buffer was fixed with - * |CBB_init_fixed|, must call |OPENSSL_free| when done. + * |CBB_init_fixed|, must call |free| when done. * * It can only be called on a "top level" |CBB|, i.e. one initialised with * |CBB_init| or |CBB_init_fixed|. It returns one on success and zero on diff --git a/lib/libssl/src/ssl/bs_ber.c b/lib/libssl/src/ssl/bs_ber.c index 1dde38264e3..2ec91fc8008 100644 --- a/lib/libssl/src/ssl/bs_ber.c +++ b/lib/libssl/src/ssl/bs_ber.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_ber.c,v 1.3 2015/04/29 01:31:39 doug Exp $ */ +/* $OpenBSD: bs_ber.c,v 1.4 2015/04/29 02:11:09 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -54,7 +54,7 @@ cbs_find_ber(CBS *orig_in, char *ber_found, unsigned depth) return 0; if (CBS_len(&contents) == header_len && header_len > 0 && - CBS_data(&contents)[header_len-1] == 0x80) { + CBS_data(&contents)[header_len - 1] == 0x80) { *ber_found = 1; return 1; } diff --git a/lib/libssl/src/ssl/bs_cbs.c b/lib/libssl/src/ssl/bs_cbs.c index 0237f736819..4c1bfa32881 100644 --- a/lib/libssl/src/ssl/bs_cbs.c +++ b/lib/libssl/src/ssl/bs_cbs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_cbs.c,v 1.6 2015/04/29 01:27:34 doug Exp $ */ +/* $OpenBSD: bs_cbs.c,v 1.7 2015/04/29 02:11:09 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -84,7 +84,7 @@ int CBS_strdup(const CBS *cbs, char **out_ptr) { free(*out_ptr); - *out_ptr = strndup((const char*)cbs->data, cbs->len); + *out_ptr = strndup((const char *)cbs->data, cbs->len); return (*out_ptr != NULL); } @@ -251,7 +251,7 @@ CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, /* Length should have used short-form encoding. */ return 0; - if ((len32 >> ((num_bytes-1)*8)) == 0) + if ((len32 >> ((num_bytes - 1) * 8)) == 0) /* Length should have been at least one byte shorter. */ return 0; diff --git a/lib/libssl/src/ssl/bytestring.h b/lib/libssl/src/ssl/bytestring.h index 93c3df6f107..c2b94c31a24 100644 --- a/lib/libssl/src/ssl/bytestring.h +++ b/lib/libssl/src/ssl/bytestring.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bytestring.h,v 1.4 2015/02/07 06:10:32 doug Exp $ */ +/* $OpenBSD: bytestring.h,v 1.5 2015/04/29 02:11:09 doug Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -68,8 +68,8 @@ size_t CBS_len(const CBS *cbs); /* * CBS_stow copies the current contents of |cbs| into |*out_ptr| and * |*out_len|. If |*out_ptr| is not NULL, the contents are freed with - * OPENSSL_free. It returns one on success and zero on allocation failure. On - * success, |*out_ptr| should be freed with OPENSSL_free. If |cbs| is empty, + * free. It returns one on success and zero on allocation failure. On + * success, |*out_ptr| should be freed with free. If |cbs| is empty, * |*out_ptr| will be NULL. */ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); @@ -77,8 +77,8 @@ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); /* * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed - * with OPENSSL_free. It returns one on success and zero on allocation - * failure. On success, |*out_ptr| should be freed with OPENSSL_free. + * with free. It returns one on success and zero on allocation + * failure. On success, |*out_ptr| should be freed with free. * * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. @@ -335,7 +335,7 @@ void CBB_cleanup(CBB *cbb); * CBB_finish completes any pending length prefix and sets |*out_data| to a * malloced buffer and |*out_len| to the length of that buffer. The caller * takes ownership of the buffer and, unless the buffer was fixed with - * |CBB_init_fixed|, must call |OPENSSL_free| when done. + * |CBB_init_fixed|, must call |free| when done. * * It can only be called on a "top level" |CBB|, i.e. one initialised with * |CBB_init| or |CBB_init_fixed|. It returns one on success and zero on