We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is some code in the project as follows
try { slot_ = atoi(args[2].c_str()); dst_node_id_ = args[3]; } catch (std::exception &e) { return Status(Status::RedisParseErr, errValueNotInterger); }
However atoi does not throw exceptions, so perhaps we should use std::stoi to replace these.
atoi
std::stoi
Replace atoi to std::stoi
The text was updated successfully, but these errors were encountered:
Good catch, I think we can use Util::OctalStringToNum to replace the atoi which also can check the min/max boundary.
Util::OctalStringToNum
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Search before asking
Motivation
There is some code in the project as follows
However
atoi
does not throw exceptions, so perhaps we should usestd::stoi
to replace these.Solution
Replace
atoi
tostd::stoi
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: