Skip to content

Commit

Permalink
adjust format and remove test warning
Browse files Browse the repository at this point in the history
Signed-off-by: hwware <[email protected]>
  • Loading branch information
hwware committed Sep 26, 2024
1 parent 204b909 commit 8a9d80e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -13059,7 +13059,7 @@ void moduleCommand(client *c) {
" Load a module library from <path>, passing to it any optional arguments.",
"LOADEX <path> [[CONFIG NAME VALUE] [CONFIG NAME VALUE]] [ARGS ...]",
" Load a module library from <path>, while passing it module configurations and optional arguments.",
"SET-ARGUMENT <name> [<arg> ...]",
"SET-ARGUMENT <name> [<arg> ...]",
" Set module arguments to new values during runtime.",
"UNLOAD <name>",
" Unload a module.",
Expand Down Expand Up @@ -13110,11 +13110,11 @@ void moduleCommand(client *c) {
} else if (!strcasecmp(subcmd, "set-argument") && c->argc >= 3) {
struct ValkeyModule *module = dictFetchValue(modules, c->argv[2]->ptr);
if (module != NULL) {
for (int i = 0; i < module->loadmod->argc; i++) {
for (int i = 0; i < module->loadmod->argc; i++) {
decrRefCount(module->loadmod->argv[i]);
}
zfree(module->loadmod->argv);
robj **argv = NULL;
robj **argv = NULL;
int argc = 0;

if (c->argc > 3) {
Expand Down
3 changes: 3 additions & 0 deletions tests/modules/moduleparameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <string.h>

int GET_HELLO(ValkeyModuleCtx *ctx, ValkeyModuleString **argv, int argc) {
VALKEYMODULE_NOT_USED(argv);
VALKEYMODULE_NOT_USED(argc);

return ValkeyModule_ReplyWithSimpleString(ctx, "This is update module parameter test module");
}

Expand Down

0 comments on commit 8a9d80e

Please sign in to comment.