public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Andrew Burgess <aburgess@redhat.com>, binutils@sourceware.org
Subject: Re: [PATCH] bfd: add new bfd_cache_size() function
Date: Thu, 12 Oct 2023 13:32:24 +0100	[thread overview]
Message-ID: <eab631e6-e94d-4e6b-8f6e-669aac82845e@redhat.com> (raw)
In-Reply-To: <875y3dclp9.fsf@redhat.com>

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


  reply	other threads:[~2023-10-12 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 16:03 Andrew Burgess
2023-10-06 21:09 ` Torbjorn SVENSSON
2023-10-09 14:01 ` Nick Clifton
2023-10-11 13:50   ` Andrew Burgess
2023-10-12 12:32     ` Nick Clifton [this message]
2023-10-12 13:00       ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eab631e6-e94d-4e6b-8f6e-669aac82845e@redhat.com \
    --to=nickc@redhat.com \
    --cc=aburgess@redhat.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).