Page MenuHomeFreeBSD

fortune: Unindent a debug printf in get_fort().
ClosedPublic

Authored by jhb on Sep 29 2022, 10:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 1:45 AM
Unknown Object (File)
Fri, Oct 10, 7:09 AM
Unknown Object (File)
Fri, Oct 10, 7:09 AM
Unknown Object (File)
Fri, Oct 10, 7:09 AM
Unknown Object (File)
Fri, Oct 10, 1:16 AM
Unknown Object (File)
Sun, Oct 5, 11:06 PM
Unknown Object (File)
Fri, Oct 3, 4:48 AM
Unknown Object (File)
Sep 13 2025, 4:23 PM
Subscribers

Details

Summary

The debug printf is intended to execute after the loop has ended to
log the selected file.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Sep 29 2022, 10:29 PM

IMO we ought to add { } to the for loop to make this clear.

Did a GCC warning identify this?

This revision is now accepted and ready to land.Sep 30 2022, 2:28 PM

+1 for the {}. but it's up to you.

Yes, this was -Wmisleading-indentation. I think we currently make that a non-fatal error for clang. We should perhaps see what happens if we make it fatal for clang.

This revision was automatically updated to reflect the committed changes.