Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e94189

Browse files
committed
Remove double negative
1 parent 611eaf0 commit 0e94189

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_textio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self,
305305
for the \r *byte* with the libc's optimized memchr.
306306
*/
307307
if (seennl == SEEN_LF || seennl == 0) {
308-
only_lf = !(memchr(in_str, '\r', len * sizeof(Py_UNICODE)) != NULL);
308+
only_lf = (memchr(in_str, '\r', len * sizeof(Py_UNICODE)) == NULL);
309309
}
310310

311311
if (only_lf) {

0 commit comments

Comments
 (0)