node
node copied to clipboard
zlib: reduce code duplication
The offset in the allocated memory was calculated in alloc and free, this makes it a single constant so it only needs to be defined once.
As requested by @Flarna in https://github.com/nodejs/node/pull/57727
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 90.20%. Comparing base (67786c1) to head (1051f9e).
:warning: Report is 1161 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #57810 +/- ##
==========================================
- Coverage 90.21% 90.20% -0.02%
==========================================
Files 630 630
Lines 185524 185522 -2
Branches 36387 36375 -12
==========================================
- Hits 167378 167357 -21
- Misses 11037 11044 +7
- Partials 7109 7121 +12
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/node_zlib.cc | 78.37% <100.00%> (-0.05%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
CI: https://ci.nodejs.org/job/node-test-pull-request/69327/
Landed in 54c456702c7fe6b9b0ef026f864dc1bc9590c88e