diff options
author | Mark D. Roth <roth@google.com> | 2016-09-30 08:23:30 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-09-30 08:23:30 -0700 |
commit | d51e0352c5460a0c050a026dd4d2c1b498ddb57f (patch) | |
tree | 58f3826e05756045f866dbdd0feee836da722550 /src/core/lib/channel | |
parent | 408913845c04ab9c9a60de9370becad83999f50f (diff) |
Various fixes and clean-ups.
Diffstat (limited to 'src/core/lib/channel')
-rw-r--r-- | src/core/lib/channel/channel_args.c | 4 | ||||
-rw-r--r-- | src/core/lib/channel/channel_args.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index bab6fcd9fa..2957d2c818 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -276,7 +276,9 @@ const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, const char *name) { if (args != NULL) { for (size_t i = 0; i < args->num_args; ++i) { - if (args->args[i].key == name) return &args->args[i]; + if (strcmp(args->args[i].key, name) == 0) { + return &args->args[i]; + } } } return NULL; diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 38fb4c55d4..a80340c0fa 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -89,9 +89,7 @@ uint32_t grpc_channel_args_compression_algorithm_get_states( int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b); -/** Returns the value of argument \a name from \a args, or NULL if not found. - Note: \a name is matched using pointer equality, so it must be the - same instance of the string used to create the grpc_arg key. */ +/** Returns the value of argument \a name from \a args, or NULL if not found. */ const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, const char *name); |