[Rpm-maint] [rpm-software-management/rpm] Header internals type cleanup (PR #2387)

Panu Matilainen notifications at github.com
Wed Feb 8 13:07:40 UTC 2023


*Fun* (for some idea of fun) refactoring of header internals to replace signed integers with unsigned ones in various places.

This is a significant chunk of #2385, but not complete.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2387

-- Commit Summary --

  * Drop unused ei2td() internal helper
  * Bury ei2h() inside header.c, no external users anymore
  * Fix some non-functional signed integer references to unsigned
  * Switch all header entryinfo pointers from int32_t to uint32_t
  * Switch header index and datalength types from int32_t to uint32_t
  * Switch header region index and data lengths to unsigned integers
  * Refactor regionSwab() to return the length through a pointer
  * Refactor dataLength() to return the length through a pointer
  * Switch regionSwab() length return type to unsigned, update callers
  * Refactor strtaglen() to return the length through a pointer
  * Switch the various header data length arguments to unsigned

-- File Changes --

    M lib/header.c (184)
    M lib/header_internal.h (35)
    M lib/package.c (2)
    M lib/query.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2387.patch
https://github.com/rpm-software-management/rpm/pull/2387.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2387
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2387 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230208/dd5e2cf0/attachment.html>


More information about the Rpm-maint mailing list