From 1fb4cc0e76288f58482fd1bf9a9af87bf239c6cf Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Fri, 1 Jul 2016 03:24:00 -0700 Subject: [PATCH] Fix history.cpp merge --- src/history.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/history.cpp b/src/history.cpp index 64c53f406..63b70c20e 100644 --- a/src/history.cpp +++ b/src/history.cpp @@ -791,14 +791,14 @@ static size_t read_line(const char *base, size_t cursor, size_t len, std::string /* Locate the newline */ assert(cursor <= len); const char *start = base + cursor; - const char *newline = (char *)memchr(start, '\n', len - cursor); - if (newline != NULL) + const char *a_newline = (char *)memchr(start, '\n', len - cursor); + if (a_newline != NULL) { /* We found a newline. */ - result.assign(start, newline - start); + result.assign(start, a_newline - start); /* Return the amount to advance the cursor; skip over the newline */ - return newline - start + 1; + return a_newline - start + 1; } else { @@ -1799,7 +1799,7 @@ void history_t::populate_from_bash(FILE *stream) if (success) { /* Skip the newline */ - char *newline = strchr(buff, '\n'); + char *a_newline = strchr(buff, '\n'); if (a_newline) *a_newline = '\0'; has_newline = (a_newline != NULL);