summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-06-08 21:15:06 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-06-08 21:15:06 (GMT)
commitd7afd31a9bef6e0498e8fce646a2d4e8e8576e87 (patch)
tree9b6d0fa4450ca3492699a1e23580f9afab9ec45a /PC
parentfa4c59fa0cf3e9aad2b26f8c7790eb50b7003d6d (diff)
downloadcpython-d7afd31a9bef6e0498e8fce646a2d4e8e8576e87.zip
cpython-d7afd31a9bef6e0498e8fce646a2d4e8e8576e87.tar.gz
cpython-d7afd31a9bef6e0498e8fce646a2d4e8e8576e87.tar.bz2
Move a variable declration outside of a loop to match what was
done in r81843 for py3k.
Diffstat (limited to 'PC')
-rw-r--r--PC/_winreg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c
index d3c39f9..445c3ed 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -1187,6 +1187,7 @@ PyEnumValue(PyObject *self, PyObject *args)
long rc;
char *retValueBuf;
char *retDataBuf;
+ char *tmpBuf;
DWORD retValueSize, bufValueSize;
DWORD retDataSize, bufDataSize;
DWORD typ;
@@ -1218,7 +1219,6 @@ PyEnumValue(PyObject *self, PyObject *args)
}
while (1) {
- char *tmp;
Py_BEGIN_ALLOW_THREADS
rc = RegEnumValue(hKey,
index,
@@ -1234,13 +1234,13 @@ PyEnumValue(PyObject *self, PyObject *args)
break;
bufDataSize *= 2;
- tmp = (char *)PyMem_Realloc(retDataBuf, bufDataSize);
- if (tmp == NULL) {
+ tmpBuf = (char *)PyMem_Realloc(retDataBuf, bufDataSize);
+ if (tmpBuf == NULL) {
PyErr_NoMemory();
retVal = NULL;
goto fail;
}
- retDataBuf = tmp;
+ retDataBuf = tmpBuf;
retDataSize = bufDataSize;
retValueSize = bufValueSize;
}