]> granicus.if.org Git - python/commitdiff
Remove unneeded variable initialization.
authorBrett Cannon <bcannon@gmail.com>
Mon, 3 May 2010 23:41:23 +0000 (23:41 +0000)
committerBrett Cannon <bcannon@gmail.com>
Mon, 3 May 2010 23:41:23 +0000 (23:41 +0000)
Found using Clang's static analyzer.

Modules/_ssl.c

index eef658843e67731226ce77fa7525ba78548c4461..44f9386607bd9ddcdeacc2e646413b39b64f9c4d 100644 (file)
@@ -464,7 +464,6 @@ static PyObject *PySSL_SSLdo_handshake(PySSLObject *self)
 
        /* Actually negotiate SSL connection */
        /* XXX If SSL_do_handshake() returns 0, it's also a failure. */
-       sockstate = 0;
        do {
                PySSL_BEGIN_ALLOW_THREADS
                ret = SSL_do_handshake(self->ssl);
@@ -1198,7 +1197,6 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args)
                goto error;
        }
        do {
-               err = 0;
                PySSL_BEGIN_ALLOW_THREADS
                len = SSL_write(self->ssl, buf.buf, buf.len);
                err = SSL_get_error(self->ssl, len);
@@ -1317,7 +1315,6 @@ static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
                }
        }
        do {
-               err = 0;
                PySSL_BEGIN_ALLOW_THREADS
                count = SSL_read(self->ssl, PyString_AsString(buf), len);
                err = SSL_get_error(self->ssl, count);