aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nnoble@google.com>2015-01-26 17:05:31 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2015-01-26 17:59:15 -0800
commita2fa1d778f192902feab7b8c5b8f70a7290db051 (patch)
tree62ac8a191ffd676513f1f00b418ea73f50dfd6e6 /src/core
parentf66ccc44d7509303a22a5ed602b366d436864afd (diff)
Fixing a few typos.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/json/json_reader.c2
-rw-r--r--src/core/security/json_token.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/json/json_reader.c b/src/core/json/json_reader.c
index c3877966dd..7f52bf2b6d 100644
--- a/src/core/json/json_reader.c
+++ b/src/core/json/json_reader.c
@@ -103,7 +103,7 @@ int grpc_json_reader_is_complete(grpc_json_reader* reader) {
}
grpc_json_reader_ret grpc_json_reader_run(grpc_json_reader* reader) {
- int c, success;
+ gpr_uint32 c, success;
/* This state-machine is a strict implementation of ECMA-404 */
for (;;) {
diff --git a/src/core/security/json_token.c b/src/core/security/json_token.c
index 9aeeb892a5..6462375f35 100644
--- a/src/core/security/json_token.c
+++ b/src/core/security/json_token.c
@@ -68,7 +68,7 @@ static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override = NULL;
static const char *json_get_string_property(grpc_json *json,
const char *prop_name) {
grpc_json *child;
- for (child = json->child; child; child = child->next) {
+ for (child = json->child; child != NULL; child = child->next) {
if (strcmp(child->key, prop_name) == 0) break;
}
if (child == NULL || child->type != GRPC_JSON_STRING) {
@@ -173,7 +173,7 @@ static grpc_json *create_child(grpc_json *brother, grpc_json *parent,
const char *key, const char *value,
grpc_json_type type) {
grpc_json *child = grpc_json_new(type);
- if (brother) (brother)->next = child;
+ if (brother) brother->next = child;
if (!parent->child) parent->child = child;
child->parent = parent;
child->value = value;
@@ -192,7 +192,7 @@ static char *encoded_jwt_header(const char *algorithm) {
json_str = grpc_json_dump_to_string(json, 0);
result = grpc_base64_encode(json_str, strlen(json_str), 1, 0);
- free(json_str);
+ gpr_free(json_str);
grpc_json_delete(json);
return result;
}
@@ -224,7 +224,7 @@ static char *encoded_jwt_claim(const grpc_auth_json_key *json_key,
json_str = grpc_json_dump_to_string(json, 0);
result = grpc_base64_encode(json_str, strlen(json_str), 1, 0);
- free(json_str);
+ gpr_free(json_str);
grpc_json_delete(json);
return result;
}