Message 190887 - Python tracker
Message190887
| Author | serhiy.storchaka |
|---|---|
| Recipients | abacabadabacaba, larry, serhiy.storchaka |
| Date | 2013-06-10.05:53:38 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1370843618.78.0.36433607494.issue17899@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
rewinddir() is called only when dirp != NULL && fd > -1. fdopendir() is called when fd != -1. close() is called when dirp == NULL && fd != -1. Therefore rewinddir() and fdopendir() with close() can't be called in the same time. And you can move block
if (dirp == NULL)
close(fd);
up, just after fdopendir(). In all other branches fd == -1 and close() is not called. You will save #ifdef HAVE_FDOPENDIR/#endif and Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS lines. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2013-06-10 05:53:38 | serhiy.storchaka | set | recipients: + serhiy.storchaka, larry, abacabadabacaba |
| 2013-06-10 05:53:38 | serhiy.storchaka | set | messageid: <1370843618.78.0.36433607494.issue17899@psf.upfronthosting.co.za> |
| 2013-06-10 05:53:38 | serhiy.storchaka | link | issue17899 messages |
| 2013-06-10 05:53:38 | serhiy.storchaka | create | |