summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Rahm <ericrahm@gmail.com>2016-02-03 15:13:10 -0800
committerEric Rahm <ericrahm@gmail.com>2016-02-03 15:13:10 -0800
commitee6024fbdc746ceb3baa04ecda13fb221324518c (patch)
tree1bb8999d21f8c2090b9d529c655bc9c34f3b1f67
parentbffb2efbfd1d20f20e5c3e582a459097fed2c631 (diff)
downloadpsutil-ee6024fbdc746ceb3baa04ecda13fb221324518c.tar.gz
Address style feedback
-rw-r--r--psutil/_psutil_windows.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index 2456935e..72cc9998 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -786,11 +786,13 @@ psutil_proc_memory_uss(PyObject *self, PyObject *args)
HANDLE proc;
PSAPI_WORKING_SET_INFORMATION tmp;
DWORD tmp_size = sizeof(tmp);
- size_t entries, private_pages, i;
+ size_t entries;
+ size_t private_pages;
+ size_t i;
DWORD info_array_size;
PSAPI_WORKING_SET_INFORMATION* info_array;
SYSTEM_INFO system_info;
- PyObject* result = NULL;
+ PyObject* py_result = NULL;
unsigned long long total = 0;
if (! PyArg_ParseTuple(args, "l", &pid))
@@ -804,7 +806,7 @@ psutil_proc_memory_uss(PyObject *self, PyObject *args)
memset(&tmp, 0, tmp_size);
if (!QueryWorkingSet(proc, &tmp, tmp_size)) {
// NB: QueryWorkingSet is expected to fail here due to the
- // buffer being too small.
+ // buffer being too small.
if (tmp.NumberOfEntries == 0) {
PyErr_SetFromWindowsErr(0);
goto done;
@@ -843,7 +845,7 @@ psutil_proc_memory_uss(PyObject *self, PyObject *args)
// GetSystemInfo has no return value.
GetSystemInfo(&system_info);
total = private_pages * system_info.dwPageSize;
- result = Py_BuildValue("K", total);
+ py_result = Py_BuildValue("K", total);
done:
if (proc) {
@@ -854,7 +856,7 @@ done:
free(info_array);
}
- return result;
+ return py_result;
}