diff options
author | Alastair Houghton <alastair@alastairs-place.net> | 2019-01-02 09:01:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 09:01:03 +0000 |
commit | 2d09bb1a31700a446454c84247c98bea3f3d72a2 (patch) | |
tree | 885919cf12721d092f7e57b8e0452ffcac91587e | |
parent | b8662eca722ee3417c433468cb6041440d0af8c9 (diff) | |
parent | 863bd720bd443cad848cece4f24bcc7a5d07238c (diff) | |
download | netifaces-git-2d09bb1a31700a446454c84247c98bea3f3d72a2.tar.gz |
Merge pull request #29 from asomers/issue_28
Fix invalid errno check in netifaces.gateways()
-rw-r--r-- | netifaces.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/netifaces.c b/netifaces.c index 428ea84..fa18add 100644 --- a/netifaces.c +++ b/netifaces.c @@ -2007,7 +2007,7 @@ gateways (PyObject *self) buffer = ptr; ret = sysctl (mib, 6, buffer, &len, 0, 0); - } while (ret != 0 || errno == ENOMEM || errno == EINTR); + } while (ret != 0 && (errno == ENOMEM || errno == EINTR)); if (ret < 0) { PyErr_SetFromErrno (PyExc_OSError); |