]> granicus.if.org Git - php/commitdiff
Remove unused delimiter parameter in php_fgetcsv_lookup_trailing_spaces subroutine.
authorGeorge Peter Banyard <girgias@php.net>
Fri, 10 Jan 2020 01:53:05 +0000 (02:53 +0100)
committerGeorge Peter Banyard <girgias@php.net>
Fri, 10 Jan 2020 02:38:16 +0000 (03:38 +0100)
ext/standard/file.c

index 25a426e2b5db751547dad652528d369a42838327..aba87443a28b99c87c6ba8150bfd92eb9d18d0a6 100644 (file)
@@ -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++;
                        }