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)
Sat, Mar 28, 9:33 AM
Unknown Object (File)
Fri, Mar 27, 12:20 PM
Unknown Object (File)
Fri, Mar 27, 6:39 AM
Unknown Object (File)
Mon, Mar 23, 11:21 PM
Unknown Object (File)
Thu, Mar 19, 6:58 PM
Unknown Object (File)
Wed, Mar 18, 5:32 AM
Unknown Object (File)
Thu, Mar 12, 9:09 AM
Unknown Object (File)
Thu, Mar 12, 12:15 AM
Subscribers

Diff Detail

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

Event Timeline

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

buf = new char[filesize](); ?

251

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?

251

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.