From 6d88281357fdb15873d5145d626707bc31776202 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 22 Sep 2020 11:18:44 +0200 Subject: [PATCH] tweaks: rename another variable, away from being misnamed It refers to a column number, not an x position. --- src/history.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/history.c b/src/history.c index 36ad6aef..a32cf754 100644 --- 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. */