Skip to content

Commit

Permalink
fix template misuse
Browse files Browse the repository at this point in the history
  • Loading branch information
ellutionist committed Sep 26, 2022
1 parent 8398e79 commit cb6d1d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/redis_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -478,23 +478,23 @@ class CommandSet : public Commander {
xx_ = true;
} else if (opt == "ex" && !ttl_ && !last_arg) {
std::string s = args_[++i];
StatusOr<int> parse_status = ParseInt(s);
auto parse_status = ParseInt<int>(s);
if (!parse_status.IsOK()) {
return Status(Status::RedisParseErr, errValueNotInterger);
}
ttl_ = parse_status.GetValue();
if (ttl_ <= 0) return Status(Status::RedisParseErr, errInvalidExpireTime);
} else if (opt == "exat" && !ttl_ && !expire_ && !last_arg) {
std::string s = args_[++i];
StatusOr<int64_t> parse_status = ParseInt(s);
auto parse_status = ParseInt<int64_t>(s);
if (!parse_status.IsOK()) {
return Status(Status::RedisParseErr, errValueNotInterger);
}
expire_ = parse_status.GetValue();
if (expire_ <= 0) return Status(Status::RedisParseErr, errInvalidExpireTime);
} else if (opt == "pxat" && !ttl_ && !expire_ && !last_arg) {
std::string s = args_[++i];
StatusOr<uint64_t> parse_status = ParseInt(s);
auto parse_status = ParseInt<uint64_t>(s);
if (!parse_status.IsOK()) {
return Status(Status::RedisParseErr, errValueNotInterger);
}
Expand Down

0 comments on commit cb6d1d8

Please sign in to comment.