diff options
author | Yao Qi <yao@codesourcery.com> | 2014-11-23 13:57:00 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-11-23 13:57:00 +0800 |
commit | 88db67effd5c083011397a00e40fe03ea70629d8 (patch) | |
tree | 7f8839cd80d74fb832251a197bfa9239af5a3904 /gdb/tui/tui-io.c | |
parent | 576054f170b1d1a2ab8c9473798193fcd5687c3a (diff) | |
download | gdb-88db67effd5c083011397a00e40fe03ea70629d8.zip gdb-88db67effd5c083011397a00e40fe03ea70629d8.tar.gz gdb-88db67effd5c083011397a00e40fe03ea70629d8.tar.bz2 |
Refine read_string
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.
gdb:
2014-11-23 Yao Qi <yao@codesourcery.com>
* valprint.c (read_string): Move local variables 'found_nul',
'chunksize' and 'limit' to inner scope. Update comments.
Diffstat (limited to 'gdb/tui/tui-io.c')
0 files changed, 0 insertions, 0 deletions