From b79efec9947a72cdd587356bd0b1b6f9e4c8c27d Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 10 Jan 2020 02:53:05 +0100 Subject: [PATCH] Remove unused delimiter parameter in php_fgetcsv_lookup_trailing_spaces subroutine. --- ext/standard/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/file.c b/ext/standard/file.c index 25a426e2b5..aba87443a2 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1764,7 +1764,7 @@ PHPAPI PHP_FUNCTION(fread) } /* }}} */ -static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t len, const char delimiter) /* {{{ */ +static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t len) /* {{{ */ { int inc_len; unsigned char last_chars[2] = { 0, 0 }; @@ -2049,7 +2049,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int /* Strip trailing space from buf, saving end of line in case required for enclosure field */ bptr = buf; - tptr = (char *)php_fgetcsv_lookup_trailing_spaces(buf, buf_len, delimiter); + tptr = (char *)php_fgetcsv_lookup_trailing_spaces(buf, buf_len); line_end_len = buf_len - (size_t)(tptr - buf); line_end = limit = tptr; @@ -2147,7 +2147,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int bptr = buf = new_buf; hunk_begin = buf; - line_end = limit = (char *)php_fgetcsv_lookup_trailing_spaces(buf, buf_len, delimiter); + line_end = limit = (char *)php_fgetcsv_lookup_trailing_spaces(buf, buf_len); line_end_len = buf_len - (size_t)(limit - buf); state = 0; @@ -2274,7 +2274,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int memcpy(tptr, hunk_begin, bptr - hunk_begin); tptr += (bptr - hunk_begin); - comp_end = (char *)php_fgetcsv_lookup_trailing_spaces(temp, tptr - temp, delimiter); + comp_end = (char *)php_fgetcsv_lookup_trailing_spaces(temp, tptr - temp); if (*bptr == delimiter) { bptr++; } -- 2.40.0