Skip to content

Commit

Permalink
netbsd: fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed May 13, 2017
1 parent 826c0bf commit 89962e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions psutil/arch/bsd/netbsd_socks.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,16 @@ psutil_get_info(int aff) {
*/
PyObject *
psutil_net_connections(PyObject *self, PyObject *args) {
PyObject *py_retlist = PyList_New(0);
char laddr[PATH_MAX];
char raddr[PATH_MAX];
int32_t lport;
int32_t rport;
int32_t status;
pid_t pid;
PyObject *py_tuple = NULL;
PyObject *py_laddr = NULL;
PyObject *py_raddr = NULL;
pid_t pid;
PyObject *py_retlist = PyList_New(0);

if (py_retlist == NULL)
return NULL;
Expand All @@ -339,11 +344,6 @@ psutil_net_connections(PyObject *self, PyObject *args) {
SLIST_FOREACH(kp, &kpcbhead, kpcbs) {
if (k->kif->ki_fdata != kp->kpcb->ki_sockaddr)
continue;
char laddr[PATH_MAX];
char raddr[PATH_MAX];
int32_t lport;
int32_t rport;
int32_t status;

// IPv4 or IPv6
if ((kp->kpcb->ki_family == AF_INET) ||
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def get_ethtool_macro():
else:
sys.exit('platform %s is not supported' % sys.platform)


if POSIX:
posix_extension = Extension(
'psutil._psutil_posix',
Expand Down

0 comments on commit 89962e2

Please sign in to comment.