summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-03-03 08:24:16 +0000
committerJim Meyering <jim@meyering.net>2000-03-03 08:24:16 +0000
commit2c43f8c612ac215126cea8939485c652b6b1b8d4 (patch)
tree127fddae7f23a54d1a565a36e238ad5335e05758 /src/sort.c
parent8e1e6d357a8d32a62bfcc5c3ce02dfa7529247f5 (diff)
downloadcoreutils-2c43f8c612ac215126cea8939485c652b6b1b8d4.tar.xz
(fillbuf): Move declaration of local, cc, into scope of
`while' loop where it's used.
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sort.c b/src/sort.c
index e96f0db19..2b064db57 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -545,8 +545,6 @@ initbuf (struct buffer *buf, int alloc)
static int
fillbuf (struct buffer *buf, FILE *fp)
{
- int cc;
-
if (buf->used != buf->left)
{
memmove (buf->buf, buf->buf + buf->used - buf->left, buf->left);
@@ -555,6 +553,7 @@ fillbuf (struct buffer *buf, FILE *fp)
while (!feof (fp))
{
+ int cc;
if (buf->used == buf->alloc)
{
buf->alloc *= 2;