diff --git a/server/cmd_hash.go b/server/cmd_hash.go index fa720db..cb3d752 100644 --- a/server/cmd_hash.go +++ b/server/cmd_hash.go @@ -224,7 +224,7 @@ func hmclearCommand(c *client) error { func hexpireCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -244,7 +244,7 @@ func hexpireCommand(c *client) error { func hexpireAtCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -264,7 +264,7 @@ func hexpireAtCommand(c *client) error { func httlCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 1 { return ErrCmdParams } diff --git a/server/cmd_kv.go b/server/cmd_kv.go index 9f72b39..1f61f5e 100644 --- a/server/cmd_kv.go +++ b/server/cmd_kv.go @@ -205,7 +205,7 @@ func mgetCommand(c *client) error { func expireCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -225,7 +225,7 @@ func expireCommand(c *client) error { func expireAtCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -245,7 +245,7 @@ func expireAtCommand(c *client) error { func ttlCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 1 { return ErrCmdParams } diff --git a/server/cmd_list.go b/server/cmd_list.go index c7b1c81..bc059ec 100644 --- a/server/cmd_list.go +++ b/server/cmd_list.go @@ -160,7 +160,7 @@ func lmclearCommand(c *client) error { func lexpireCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -180,7 +180,7 @@ func lexpireCommand(c *client) error { func lexpireAtCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -200,7 +200,7 @@ func lexpireAtCommand(c *client) error { func lttlCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 1 { return ErrCmdParams } diff --git a/server/cmd_zset.go b/server/cmd_zset.go index bf2fce1..d51c825 100644 --- a/server/cmd_zset.go +++ b/server/cmd_zset.go @@ -426,7 +426,7 @@ func zmclearCommand(c *client) error { func zexpireCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -446,7 +446,7 @@ func zexpireCommand(c *client) error { func zexpireAtCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 2 { return ErrCmdParams } @@ -466,7 +466,7 @@ func zexpireAtCommand(c *client) error { func zttlCommand(c *client) error { args := c.args - if len(args) == 0 { + if len(args) != 1 { return ErrCmdParams }