summaryrefslogtreecommitdiff
path: root/psutil/_psutil_linux.c
diff options
context:
space:
mode:
authorDavid Daeschler <david.daeschler@gmail.com>2014-08-11 16:21:46 -0400
committerDavid Daeschler <david.daeschler@gmail.com>2014-08-11 16:21:46 -0400
commit4be391d93bcde42aaf8fd2168d5aae8e6c3c9f87 (patch)
tree3d9f0c36643960da6f2b9c75e4281e5eb9ecb2cc /psutil/_psutil_linux.c
parent772021ce8bb7cdf0183bd6d6f81373d12c672c47 (diff)
downloadpsutil-4be391d93bcde42aaf8fd2168d5aae8e6c3c9f87.tar.gz
Fix C90 compilation issue
Diffstat (limited to 'psutil/_psutil_linux.c')
-rw-r--r--psutil/_psutil_linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c
index 56e48178..41d24d4e 100644
--- a/psutil/_psutil_linux.c
+++ b/psutil/_psutil_linux.c
@@ -257,7 +257,7 @@ psutil_linux_sysinfo(PyObject *self, PyObject *args)
static PyObject *
psutil_proc_cpu_affinity_get(PyObject *self, PyObject *args)
{
- int cpu, ncpus, count;
+ int cpu, ncpus, count, cpucount_s;
long pid;
size_t setsize;
cpu_set_t *mask = NULL;
@@ -290,7 +290,7 @@ psutil_proc_cpu_affinity_get(PyObject *self, PyObject *args)
if (res == NULL)
goto error;
- int cpucount_s = CPU_COUNT_S(setsize, mask);
+ cpucount_s = CPU_COUNT_S(setsize, mask);
for (cpu = 0, count = cpucount_s; count; cpu++) {
if (CPU_ISSET_S(cpu, setsize, mask)) {
#if PY_MAJOR_VERSION >= 3