node icon indicating copy to clipboard operation
node copied to clipboard

zlib: reduce code duplication

Open jhofstee opened this issue 8 months ago • 1 comments

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

jhofstee avatar Apr 09 '25 20:04 jhofstee

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:

... and 24 files with indirect coverage changes

: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.

codecov[bot] avatar Apr 09 '25 21:04 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/69327/

nodejs-github-bot avatar Sep 22 '25 14:09 nodejs-github-bot

Landed in 54c456702c7fe6b9b0ef026f864dc1bc9590c88e

nodejs-github-bot avatar Sep 22 '25 20:09 nodejs-github-bot