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

msh3: print boolean value as text representation #8763

Closed
wants to merge 1 commit into from

Conversation

danielgustafsson
Copy link
Member

Print the boolean value as its string representation instead of with %hhu which isn't a format we typically use. I don't have strong feelings wrt this in case others disagree, but %hhu struck me as odd when skimming the code.

Print the boolean value as its string representation instead of with
%hhu which isn't a format we typically use.
Copy link
Contributor

@nibanks nibanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍Though I'd add extra spaces between the ? and :, but that's just me!

@danielgustafsson
Copy link
Member Author

LGTM 👍Though I'd add extra spaces between the ? and :, but that's just me!

So embarrassingly enough I was about to say that checksrc.pl mandates the lack of spaces, but it actually doesn't. I feel like I should've known that.

So, let's turn to science to see what to do:

 $ git grep "?\"[^:]\+:\"" | wc -l
      60
 $ git grep "? \"[^:]\+ : \"" | wc -l
      65

It's pretty close but adding spaces clearly wins, so I will go do that before merging.

That got me curious though, what other permutations turn up?

 $ git grep "? \"[^:]\+[^ ]: \"" | wc -l
      35
 $ git grep "? \"[^:]\+ :\"" | wc -l
       1

Maybe we should have a rule about this after all? =)

@bagder
Copy link
Member

bagder commented Apr 28, 2022

Maybe we should have a rule about this after all? =)

Hehe, I was also convinced checksrc already checked for this, but apparently not...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants