naoa
null+****@clear*****
Thu Feb 18 19:38:23 JST 2016
naoa 2016-02-18 19:38:23 +0900 (Thu, 18 Feb 2016) New Revision: e44bd365499eb0b87e89a59d7ec1e0dddb020170 https://github.com/groonga/groonga/commit/e44bd365499eb0b87e89a59d7ec1e0dddb020170 Merged af81362: Merge pull request #483 from naoa/remove-needless Message: Remove needless code Modified files: lib/proc/proc_snippet.c Modified: lib/proc/proc_snippet.c (+1 -5) =================================================================== --- lib/proc/proc_snippet.c 2016-02-18 17:48:40 +0900 (ac153ed) +++ lib/proc/proc_snippet.c 2016-02-18 19:38:23 +0900 (1df9341) @@ -172,7 +172,7 @@ func_snippet_full(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_d int default_open_tag_length = 0; const char *default_close_tag = NULL; int default_close_tag_length = 0; - grn_obj *hash; + grn_obj *hash = NULL; if (hash_args_ptr->header.type == GRN_PTR) { hash = GRN_PTR_VALUE(hash_args_ptr); @@ -182,16 +182,12 @@ func_snippet_full(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_d grn_hash_cursor *cursor; void *key, *value; int key_size; - if (hash_args_ptr->header.type == GRN_PTR) { - hash = GRN_PTR_VALUE(hash_args_ptr); - } if (hash->header.type != GRN_TABLE_HASH_KEY) { GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, "snippet_full(): 2nd argument must be object literal: <%.*s>", (int)GRN_TEXT_LEN(args[1]), GRN_TEXT_VALUE(args[1])); goto exit; } - hash = GRN_PTR_VALUE(hash_args_ptr); if (!(cursor = grn_hash_cursor_open(ctx, (grn_hash *)hash, NULL, 0, NULL, 0, 0, -1, 0))) { GRN_PLUGIN_ERROR(ctx, GRN_NO_MEMORY_AVAILABLE, -------------- next part -------------- HTML����������������������������...Download