[PATCH] bfd: add new bfd_cache_size() function
Nick Clifton
nickc@redhat.com
Thu Oct 12 12:32:24 GMT 2023
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.
Cheers
Nick
More information about the Binutils
mailing list