File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -262,11 +262,11 @@ PyObject* _utf_8_bytes_dedent(PyObject *bytes){
262262 while (line ) {
263263 // Move the pointer up to the first non-space character
264264 char * first_nonspace = line ;
265- while (strncmp ( first_nonspace , " " , 1 ) == 0 ){
265+ while (* first_nonspace == ' ' ){
266266 first_nonspace ++ ;
267267 }
268268 // Only check lines that contain non-whitespace characters
269- if (strncmp ( first_nonspace , "\0" , 1 ) ) {
269+ if (* first_nonspace != '\0' ) {
270270
271271 Py_ssize_t num_leading_spaces = first_nonspace - line ;
272272 if (num_leading_spaces < num_common_leading_spaces ) {
@@ -359,7 +359,7 @@ pymain_run_command(wchar_t *command)
359359 }
360360
361361 // Only perform auto-dedent if the string starts with a newline
362- if (strncmp ( PyBytes_AsString (bytes ), "\n" , 1 ) == 0 ) {
362+ if (* PyBytes_AsString (bytes ) == '\n' ) {
363363 PyObject * new_bytes = _utf_8_bytes_dedent (bytes );
364364 if (new_bytes == NULL ) {
365365 goto error ;
You can’t perform that action at this time.
0 commit comments