Skip to content

doxygen2man: Fix a couple of covscan-detected errors#425

Merged
chrissie-c merged 2 commits intoClusterLabs:masterfrom
chrissie-c:covscan-doxy-fixes
Oct 22, 2020
Merged

doxygen2man: Fix a couple of covscan-detected errors#425
chrissie-c merged 2 commits intoClusterLabs:masterfrom
chrissie-c:covscan-doxy-fixes

Conversation

@chrissie-c
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@wferi wferi left a comment

Choose a reason for hiding this comment

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

Wouldn't strnlen() be simpler? Or isn't it portable enough?

@chrissie-c
Copy link
Copy Markdown
Contributor Author

I have to admit, I'd not even heard of strnlen() thanks!

for (i=0; i< len; i++) {
buffer[i] = toupper(name[i]);
}
buffer[len] = '\0';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BTW you can also shave off the len declaration by using buffer[i] = 0 here (if this is your thing). :)

@chrissie-c
Copy link
Copy Markdown
Contributor Author

Fair point, but I think using len is clearer :)

@kgaillot
Copy link
Copy Markdown

looks good to me

@chrissie-c chrissie-c merged commit c2dfe66 into ClusterLabs:master Oct 22, 2020
@chrissie-c chrissie-c deleted the covscan-doxy-fixes branch October 22, 2020 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants