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)
Oct 9 2024, 4:46 AM
Unknown Object (File)
Oct 6 2024, 1:47 AM
Unknown Object (File)
Oct 6 2024, 12:43 AM
Unknown Object (File)
Oct 3 2024, 5:04 AM
Unknown Object (File)
Oct 3 2024, 1:04 AM
Unknown Object (File)
Oct 1 2024, 2:58 AM
Unknown Object (File)
Sep 30 2024, 7:51 PM
Unknown Object (File)
Sep 27 2024, 12:09 PM
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.