Page MenuHomeFreeBSD

last: Mild style cleanup
ClosedPublic

Authored by des on Aug 12 2025, 3:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 9, 3:56 AM
Unknown Object (File)
Oct 26 2025, 1:57 PM
Unknown Object (File)
Oct 26 2025, 12:27 PM
Unknown Object (File)
Oct 26 2025, 5:18 AM
Unknown Object (File)
Oct 23 2025, 7:27 PM
Unknown Object (File)
Oct 18 2025, 7:43 PM
Unknown Object (File)
Oct 15 2025, 12:11 AM
Unknown Object (File)
Oct 10 2025, 12:33 PM
Subscribers

Details

Reviewers
markj
Group Reviewers
Klara
Commits
rG40c2b622d825: last: Mild style cleanup
Summary
  • Prefer explicit NULL comparisons to using pointers as booleans
  • Prefer explicit 0 comparisons to using strcmp() as a predicate
  • Avoid use of strcpy()

Sponsored by: Klara, Inc.

Diff Detail

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

Event Timeline

des requested review of this revision.Aug 12 2025, 3:56 PM
markj added a subscriber: markj.
markj added inline comments.
usr.bin/last/last.c
513

Not a problem in practice, but it's not very nice that this helper function sometimes returns a malloc()ed buffer, and sometimes not.

This revision is now accepted and ready to land.Aug 12 2025, 4:37 PM
This revision was automatically updated to reflect the committed changes.