Susumu Yata
null+****@clear*****
Thu Jan 11 14:13:23 JST 2018
Susumu Yata 2018-01-11 14:13:23 +0900 (Thu, 11 Jan 2018) New Revision: 6297ce85871f86dccd3e2ea82208a3894b5814b5 https://github.com/groonga/groonga/commit/6297ce85871f86dccd3e2ea82208a3894b5814b5 Message: operator: add a test op >= 0 because an enum value can be negative The underlying type of enum is implementation-defined. Modified files: lib/operator.c Modified: lib/operator.c (+1 -1) =================================================================== --- lib/operator.c 2018-01-11 14:05:02 +0900 (6c4ca0d4b) +++ lib/operator.c 2018-01-11 14:13:23 +0900 (2da43b857) @@ -121,7 +121,7 @@ static const char *operator_names[] = { const char * grn_operator_to_string(grn_operator op) { - if (op <= GRN_OP_LAST) { + if (op >= 0 && op <= GRN_OP_LAST) { return operator_names[op]; } else { return "unknown"; -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180111/e8ccf7a3/attachment.htm