qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gonglei <arei.gonglei@huawei.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: "kwolf@redhat.com" <kwolf@redhat.com>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"stefanha@redhat.com" <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 repost 2] block/curl: Improve type safety of s->timeout.
Date: Sun, 26 Oct 2014 18:45:02 +0800	[thread overview]
Message-ID: <544CD0AE.7040802@huawei.com> (raw)
In-Reply-To: <20141026102248.GS15695@redhat.com>

On 2014/10/26 18:22, Richard W.M. Jones wrote:

> It's just there to stop unreasonable timeouts or negative numbers.
> 100000 s is 27 hours, and no webserver I know of would keep a
> connection open that long.  Possibly not even the IP stack.
> 

Yes, it is. But 26 hours is OK? I just think we should assure the timeout
as reasonable range, absolutely 100000 is too big IMO.

> What's the difference between defining a number at the top of the file
> to be used once, and placing it exactly where it is used?  Except the
> former introduces long range dependencies into the code making it
> harder to read and more fragile when changed.


That's the purpose using macro. If this value is used only one place  in the
curl.c (or other c files) now and future, you are fine with it. :)

Best regards,
-Gonglei

  reply	other threads:[~2014-10-26 10:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26  8:42 [Qemu-devel] [PATCH v1 repost 2] block/curl: Improve type safety of s->timeout Richard W.M. Jones
2014-10-26  8:42 ` Richard W.M. Jones
2014-10-26  8:57   ` Gonglei
2014-10-26 10:22     ` Richard W.M. Jones
2014-10-26 10:45       ` Gonglei [this message]
2014-10-26 10:48         ` Richard W.M. Jones
2014-10-26 10:55           ` Gonglei
2014-10-26 10:57             ` Richard W.M. Jones

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=544CD0AE.7040802@huawei.com \
    --to=arei.gonglei@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=stefanha@redhat.com \
    /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 NNTP newsgroup(s).