Skip to content
New issue

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

bug: inappropriate type of ttl_ of CommandSet #2248

Closed
2 tasks done
J0HN50N133 opened this issue Apr 14, 2024 · 2 comments · Fixed by #2250
Closed
2 tasks done

bug: inappropriate type of ttl_ of CommandSet #2248

J0HN50N133 opened this issue Apr 14, 2024 · 2 comments · Fixed by #2250
Labels
bug type bug

Comments

@J0HN50N133
Copy link

J0HN50N133 commented Apr 14, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

Since db2860d until now.

Minimal reproduce step

if (ttl_ < 0) {

Here determine whether ttl_ less than 0, if so, doing deletion. However, the type of ttl_ if uint64_t which is impossible to less than 0.

uint64_t ttl_ = 0;

What did you expect to see?

If ttl_ less than 0, doing deletion.

What did you see instead?

The condition will never be true, thus, deletion will never be done.

Anything Else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@J0HN50N133 J0HN50N133 added the bug type bug label Apr 14, 2024
@git-hulk
Copy link
Member

@J0HN50N133 Thanks for your report.

You're right, would you submit a PR to fix this?

@J0HN50N133
Copy link
Author

I could fix it. Although the behaviour here is correct (because of implicit cast), it's disturbing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug
Projects
None yet
2 participants