commit 6d88281357fdb15873d5145d626707bc31776202
parent 32787a9f2286ff5181afe077a9bfc6433380f8bb
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 22 Sep 2020 11:18:44 +0200
tweaks: rename another variable, away from being misnamed
It refers to a column number, not an x position.
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/history.c b/src/history.c
@@ -396,7 +396,7 @@ void load_poshistory(void)
ssize_t read, count = 0;
struct stat fileinfo;
poshiststruct *record_ptr = NULL, *newrecord;
- char *lineptr, *xptr;
+ char *lineptr, *columnptr;
char *stanza = NULL;
size_t dummy = 0;
@@ -406,22 +406,22 @@ void load_poshistory(void)
recode_NUL_to_LF(stanza, read);
/* Find the spaces before column number and line number. */
- xptr = revstrstr(stanza, " ", stanza + read - 3);
- if (xptr == NULL)
+ columnptr = revstrstr(stanza, " ", stanza + read - 3);
+ if (columnptr == NULL)
continue;
- lineptr = revstrstr(stanza, " ", xptr - 2);
+ lineptr = revstrstr(stanza, " ", columnptr - 2);
if (lineptr == NULL)
continue;
/* Now separate the three elements of the line. */
- *(xptr++) = '\0';
+ *(columnptr++) = '\0';
*(lineptr++) = '\0';
/* Create a new position record. */
newrecord = nmalloc(sizeof(poshiststruct));
newrecord->filename = copy_of(stanza);
newrecord->linenumber = atoi(lineptr);
- newrecord->columnnumber = atoi(xptr);
+ newrecord->columnnumber = atoi(columnptr);
newrecord->next = NULL;
/* Add the record to the list. */