Page MenuHomeFreeBSD

last: Mild style cleanup
ClosedPublic

Authored by des on Aug 12 2025, 3:56 PM.
Tags
None
Referenced Files
F167716666: D51876.id160250.diff
Sun, Aug 23, 11:22 PM
F167716488: D51876.id160255.diff
Sun, Aug 23, 11:20 PM
F167716433: D51876.diff
Sun, Aug 23, 11:19 PM
Unknown Object (File)
Thu, Aug 20, 12:45 PM
Unknown Object (File)
Wed, Aug 19, 1:29 PM
Unknown Object (File)
Tue, Aug 18, 7:37 PM
Unknown Object (File)
Sun, Aug 16, 4:30 AM
Unknown Object (File)
Fri, Aug 7, 7:10 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 66198
Build 63081: arc lint + arc unit

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.