[Rpm-maint] [rpm-software-management/rpm] Code cleanups in tests/rpmpgppubkeyfingerprint.c (PR #3068)
Panu Matilainen
notifications at github.com
Tue Apr 30 05:14:53 UTC 2024
> I took the liberty to make this whole source look better.
Better is subjective. The indentation was mostly following rpm coding style, now it's not. See Coding style / Indentation in CONTRIBUTING.md. Never, ever make formatting changes at the same time as other changes, and in particular, don't break what wasn't broken.
It's impossible to review a change like this. In the light of recent events, "small test stuff" certainly needs reviewing too. One thing that did catch my eye despite that is pointless NULL checks before freeing. Don't do that, free() will do it for you anyhow.
In the meanwhile, there *are* real cleanups/simplifications to be made. Like manually calculating string sizes when it could use rasprintf(), and manual getcwd() when we have rpmGetCwd() and malloc() with OOM checking for what's a static buffer that wouldn't need freeing.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3068#issuecomment-2084396253
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3068/c2084396253 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240429/3a616ac1/attachment-0001.html>
More information about the Rpm-maint
mailing list