mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	Simplify code in fileio_init
If an identical code line is in both at the end of if and else, it can as well stand after the block. :) The code is from 464cf523485e, I didn't see it before checking the commits in the web interface of course.
This commit is contained in:
		
							parent
							
								
									76935b9c8c
								
							
						
					
					
						commit
						7f59fd7c7c
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -377,7 +377,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
                self->fd = open(name, flags, 0666);
 | 
					                self->fd = open(name, flags, 0666);
 | 
				
			||||||
            Py_END_ALLOW_THREADS
 | 
					            Py_END_ALLOW_THREADS
 | 
				
			||||||
            fd_is_own = 1;
 | 
					 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            PyObject *fdobj = PyObject_CallFunction(
 | 
					            PyObject *fdobj = PyObject_CallFunction(
 | 
				
			||||||
                                  opener, "Oi", nameobj, flags);
 | 
					                                  opener, "Oi", nameobj, flags);
 | 
				
			||||||
| 
						 | 
					@ -395,9 +394,9 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
 | 
				
			||||||
            if (self->fd == -1) {
 | 
					            if (self->fd == -1) {
 | 
				
			||||||
                goto error;
 | 
					                goto error;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            fd_is_own = 1;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        fd_is_own = 1;
 | 
				
			||||||
        if (self->fd < 0) {
 | 
					        if (self->fd < 0) {
 | 
				
			||||||
#ifdef MS_WINDOWS
 | 
					#ifdef MS_WINDOWS
 | 
				
			||||||
            if (widename != NULL)
 | 
					            if (widename != NULL)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue