Page MenuHomeFreeBSD

fusefs: prefer new/delete over malloc/free
ClosedPublic

Authored by asomers on Jan 15 2024, 11:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 15, 7:37 AM
Unknown Object (File)
Sun, Jun 14, 9:42 AM
Unknown Object (File)
Sun, Jun 14, 6:21 AM
Unknown Object (File)
Sat, Jun 13, 6:05 PM
Unknown Object (File)
May 23 2026, 3:36 AM
Unknown Object (File)
May 6 2026, 10:33 PM
Unknown Object (File)
May 3 2026, 1:20 PM
Unknown Object (File)
May 1 2026, 10:09 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55452
Build 52341: arc lint + arc unit

Event Timeline

tests/sys/fs/fusefs/bmap.cc
247

buf = new char[filesize](); ?

252

I think this should be delete[] buf;

tests/sys/fs/fusefs/bmap.cc
247

The parenthesis aren't required. Are you saying that you would like them, as a matter of style?

252

good catch.

tests/sys/fs/fusefs/bmap.cc
247

Parenthesis means to apply default initializer, to replace the memset().

asomers added inline comments.
tests/sys/fs/fusefs/bmap.cc
247

ahh.

asomers marked an inline comment as done.
  • Replaces memsets by default initializers. Delete allocations using
This revision is now accepted and ready to land.Jan 17 2024, 10:26 PM
This revision was automatically updated to reflect the committed changes.