From: Joel Brobecker <brobecker@adacore.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Refine read_string
Date: Sun, 23 Nov 2014 02:56:00 -0000 [thread overview]
Message-ID: <20141123025606.GW5774@adacore.com> (raw)
In-Reply-To: <1408586943-24077-1-git-send-email-yao@codesourcery.com>
Hi Yao,
> In read_string, we have this line
>
> chunksize = (len == -1 ? min (8, fetchlimit) : fetchlimit);
>
> but chunksize is only used in the block that lne == -1, so IWBN to
> move chunksize to the block in which it is used, and simplify the
> condition setting chunksize. This patch also moves 'found_nul' to
> inner block. This patch also splits a paragraph of comment into two,
> and move them to different condition blocks (len > 0 and len == -1)
> respectively.
>
> Rebuild GDB on x86-linux. Is it OK?
>
> gdb:
>
> 2014-08-21 Yao Qi <yao@codesourcery.com>
>
> * valprint.c (read_string): Move local variables 'found_nul',
> 'chunksize' and 'limit' to inner scope. Update comments.
Sorry for the delay in reviewing this.
I like this small improvement. Would you mind applying it?
--
Joel
next prev parent reply other threads:[~2014-11-23 2:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 2:13 Yao Qi
2014-11-23 2:56 ` Joel Brobecker [this message]
2014-11-23 6:28 ` Yao Qi
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=20141123025606.GW5774@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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