From 9936a6357a138109541471c7a7655807feddbbb8 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 4 Mar 2018 12:52:45 +0100 Subject: [PATCH] tweaks: rename a parameter and a variable, to be more fitting --- src/nano.c | 16 ++++++++-------- src/proto.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/nano.c b/src/nano.c index d7d83f71..7ad28f60 100644 --- a/src/nano.c +++ b/src/nano.c @@ -174,20 +174,20 @@ void free_filestruct(filestruct *src) delete_node(src); } -/* Renumber the lines in a buffer, starting with fileptr. */ -void renumber(filestruct *fileptr) +/* Renumber the lines in a buffer, starting with the given line. */ +void renumber(filestruct *line) { - ssize_t line; + ssize_t number; - if (fileptr == NULL) + if (line == NULL) return; - line = (fileptr->prev == NULL) ? 0 : fileptr->prev->lineno; + number = (line->prev == NULL) ? 0 : line->prev->lineno; - assert(fileptr != fileptr->next); + assert(line != line->next); - for (; fileptr != NULL; fileptr = fileptr->next) - fileptr->lineno = ++line; + for (; line != NULL; line = line->next) + line->lineno = ++number; } /* Partition the current buffer so that it appears to begin at (top, top_x) diff --git a/src/proto.h b/src/proto.h index a19c5148..86f53d7e 100644 --- a/src/proto.h +++ b/src/proto.h @@ -404,7 +404,7 @@ void unlink_node(filestruct *fileptr); void delete_node(filestruct *fileptr); filestruct *copy_filestruct(const filestruct *src); void free_filestruct(filestruct *src); -void renumber(filestruct *fileptr); +void renumber(filestruct *line); partition *partition_filestruct(filestruct *top, size_t top_x, filestruct *bot, size_t bot_x); void unpartition_filestruct(partition **p);