Page MenuHomeFreeBSD

libgssapi: modernize static string array use
ClosedPublic

Authored by brooks on Sep 29 2020, 8:21 PM.
Tags
None
Referenced Files
F150741937: D26592.id78169.diff
Fri, Apr 3, 6:29 PM
Unknown Object (File)
Fri, Apr 3, 9:54 AM
Unknown Object (File)
Fri, Apr 3, 2:07 AM
Unknown Object (File)
Thu, Apr 2, 3:25 PM
Unknown Object (File)
Wed, Apr 1, 3:17 PM
Unknown Object (File)
Wed, Apr 1, 5:24 AM
Unknown Object (File)
Fri, Mar 20, 12:42 AM
Unknown Object (File)
Mon, Mar 16, 1:17 AM
Subscribers

Details

Summary

Use designated initializers to document positions in the arrays rather
than requiring counting. Use nitems() rather than rolling it by hand to
count elements.

Also, passify a Clang 12 warning about suspcious string concatenation
within an array initializer by adding parentheses.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks created this revision.
emaste added inline comments.
lib/libgssapi/gss_display_status.c
134 ↗(On Diff #77647)

If I were king of style(9) I would take an over-80-cols line vs relying on string concatenation; parens here make me stop and think for a second before accepting that the meaning is clear. Since I'm not the king of style, no objection.

This revision is now accepted and ready to land.Sep 29 2020, 9:56 PM
This revision was automatically updated to reflect the committed changes.