Skip to content

Commit 4a60c28

Browse files
committed
removing temporary *ch object
1 parent c16f320 commit 4a60c28

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/fread.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,11 @@ static char *typesAsString(int ncol) {
242242
static inline void skip_white(const char **pch) {
243243
// skip space so long as sep isn't space and skip tab so long as sep isn't tab
244244
// always skip any \0 (NUL) that occur before end of file, #3400
245-
const char *ch = *pch;
246245
if (whiteChar == 0) { // whiteChar==0 means skip both ' ' and '\t'; sep is neither ' ' nor '\t'.
247-
while (*ch == ' ' || *ch == '\t' || (*ch == '\0' && ch < eof)) ch++;
246+
while (**pch == ' ' || **pch == '\t' || (**pch == '\0' && *pch < eof)) (*pch)++;
248247
} else {
249-
while (*ch == whiteChar || (*ch == '\0' && ch < eof)) ch++; // sep is ' ' or '\t' so just skip the other one.
248+
while (**pch == whiteChar || (**pch == '\0' && *pch < eof)) (*pch)++; // sep is ' ' or '\t' so just skip the other one.
250249
}
251-
*pch = ch;
252250
}
253251

254252
/**

0 commit comments

Comments
 (0)