You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/03/10 09:58:28 UTC
[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1312: Improve code style and do some minor fix in scripting
PragmaTwice commented on code in PR #1312:
URL: https://github.com/apache/incubator-kvrocks/pull/1312#discussion_r1132173117
##########
src/storage/scripting.cc:
##########
@@ -109,12 +110,10 @@ void loadFuncs(lua_State *lua, bool read_only) {
lua_pushcfunction(lua, redisStatusReplyCommand);
lua_settable(lua, -3);
- if (read_only) {
- /* redis.read_only */
- lua_pushstring(lua, "read_only");
- lua_pushboolean(lua, 1);
- lua_settable(lua, -3);
- }
+ /* redis.read_only */
+ lua_pushstring(lua, "read_only");
+ lua_pushboolean(lua, read_only);
+ lua_settable(lua, -3);
Review Comment:
It is not intuitionistic if the boolean value only exists when read_only is true
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org