]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Minor fiddling related to
authorTim Peters <tim.peters@gmail.com>
Wed, 9 May 2001 18:48:26 +0000 (18:48 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 9 May 2001 18:48:26 +0000 (18:48 +0000)
SF patch 416251 2.1c1 mmapmodule: unused vrbl cleanup

Modules/mmapmodule.c

index c48278f6c553eb5ec3ed6f50390e129c270cda65..dd7ff6dcf66ed9ae2df23ed64feb5e8b7980ab0f 100644 (file)
@@ -163,16 +163,13 @@ static PyObject *
 mmap_read_byte_method(mmap_object *self,
                      PyObject *args)
 {
-       char value;
-       char *where;
        CHECK_VALID(NULL);
         if (!PyArg_ParseTuple(args, ":read_byte"))
                return NULL;
        if (self->pos < self->size) {
-               where = self->data + self->pos;
-               value = (char) *(where);
+               char value = self->data[self->pos];
                self->pos += 1;
-               return Py_BuildValue("c", (char) *(where));
+               return Py_BuildValue("c", value);
        } else {
                PyErr_SetString (PyExc_ValueError, "read byte out of range");
                return NULL;