tweaks: rename two variables, to fit with the names of similar ones
parent
185e4d6b12
commit
c8ab81dd1c
|
@ -364,7 +364,8 @@ void load_poshistory(void)
|
||||||
|
|
||||||
ssize_t read, count = 0;
|
ssize_t read, count = 0;
|
||||||
struct stat fileinfo;
|
struct stat fileinfo;
|
||||||
poshiststruct *record_ptr = NULL, *newrecord;
|
poshiststruct *lastitem = NULL;
|
||||||
|
poshiststruct *newitem;
|
||||||
char *lineptr, *columnptr;
|
char *lineptr, *columnptr;
|
||||||
char *stanza = NULL;
|
char *stanza = NULL;
|
||||||
size_t dummy = 0;
|
size_t dummy = 0;
|
||||||
|
@ -387,19 +388,19 @@ void load_poshistory(void)
|
||||||
*(lineptr++) = '\0';
|
*(lineptr++) = '\0';
|
||||||
|
|
||||||
/* Create a new position record. */
|
/* Create a new position record. */
|
||||||
newrecord = nmalloc(sizeof(poshiststruct));
|
newitem = nmalloc(sizeof(poshiststruct));
|
||||||
newrecord->filename = copy_of(stanza);
|
newitem->filename = copy_of(stanza);
|
||||||
newrecord->linenumber = atoi(lineptr);
|
newitem->linenumber = atoi(lineptr);
|
||||||
newrecord->columnnumber = atoi(columnptr);
|
newitem->columnnumber = atoi(columnptr);
|
||||||
newrecord->next = NULL;
|
newitem->next = NULL;
|
||||||
|
|
||||||
/* Add the record to the list. */
|
/* Add the record to the list. */
|
||||||
if (position_history == NULL)
|
if (position_history == NULL)
|
||||||
position_history = newrecord;
|
position_history = newitem;
|
||||||
else
|
else
|
||||||
record_ptr->next = newrecord;
|
lastitem->next = newitem;
|
||||||
|
|
||||||
record_ptr = newrecord;
|
lastitem = newitem;
|
||||||
|
|
||||||
/* Impose a limit, so the file will not grow indefinitely. */
|
/* Impose a limit, so the file will not grow indefinitely. */
|
||||||
if (++count > 200) {
|
if (++count > 200) {
|
||||||
|
|
Loading…
Reference in New Issue