From 04f28d97b54f7a04f10c3b40d034c13c4d56c396 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar <makarandd@google.com> Date: Fri, 24 Mar 2017 11:32:51 -0700 Subject: review feedback and one bugfix added a needed unref_internal changed k_query_separator to a char from string review feedback addressed. added todo for changing flags to bool from int --- src/core/lib/security/util/b64.c | 2 +- src/core/lib/security/util/b64.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/lib/security/util') diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index a84e42b4f6..0d5a917660 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -93,7 +93,7 @@ void grpc_base64_encode_core(char *result, const void *vdata, size_t data_size, const unsigned char *data = vdata; const char *base64_chars = url_safe ? base64_url_safe_chars : base64_url_unsafe_chars; - size_t result_projected_size = + const size_t result_projected_size = grpc_base64_estimate_encoded_size(data_size, url_safe, multiline); char *current = result; diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index e84c50271e..ef52291c6a 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -37,7 +37,8 @@ #include <grpc/slice.h> /* Encodes data using base64. It is the caller's responsability to free - the returned char * using gpr_free. Returns NULL on NULL input. */ + the returned char * using gpr_free. Returns NULL on NULL input. + TODO(makdharma) : change the flags to bool from int */ char *grpc_base64_encode(const void *data, size_t data_size, int url_safe, int multiline); -- cgit v1.2.3