[PATCH] bfd: add new bfd_cache_size() function
Andrew Burgess
aburgess@redhat.com
Thu Oct 12 13:00:28 GMT 2023
Nick Clifton <nickc@redhat.com> writes:
> Hi Andrew,
>
>>> So if bfd_cache_size() returns an unsigned int then bfd_cache_max_open()
>>> should as well, and the files_open and max_files_open variables should
>>> be changed as well.
>>>
>>> Of course in practice we should never see negative values or large values
>>> for any of these variables/function-results, so using an "int" should be
>>> just fine. But it bugs me that functions and variables which should never
>>> have negative values are being typed as if they could have them.
>>
>> Ask and you shall receive!
>>
>> How's the patch below? This applies onto current HEAD without my
>> bfd_cache_size patch and makes the int -> unsigned changes you suggest.
>
> Excellent - that is exactly what I had in mind.
>
>> I would then update my bfd_cache_size patch to return unsigned -- but
>> I'll just go ahead and merge the updated version assuming this patch
>> here is approved.
>
> It is. Please go ahead and check in both changes.
Both changes pushed.
Thanks,
Andrew
More information about the Binutils
mailing list