aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 22:50:12 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 22:50:12 -0600
commit3d487a6f46be93331dff0d55002003b3d2c4fc00 (patch)
treed14ebbf62f394e09858403b83419f83546828e72
parentea7416a993694df4e81edfc8ff38ca2150c269c9 (diff)
downloadcryptography-3d487a6f46be93331dff0d55002003b3d2c4fc00.tar.gz
cryptography-3d487a6f46be93331dff0d55002003b3d2c4fc00.tar.bz2
cryptography-3d487a6f46be93331dff0d55002003b3d2c4fc00.zip
c89, thanks microsoft...
-rw-r--r--cryptography/hazmat/bindings/openssl/osrandom_engine.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cryptography/hazmat/bindings/openssl/osrandom_engine.py b/cryptography/hazmat/bindings/openssl/osrandom_engine.py
index 750cc435..0903a4bf 100644
--- a/cryptography/hazmat/bindings/openssl/osrandom_engine.py
+++ b/cryptography/hazmat/bindings/openssl/osrandom_engine.py
@@ -177,15 +177,16 @@ static RAND_METHOD osrandom_rand = {
/* Returns 1 if successfully added, 2 if engine has previously been added,
and 0 for error. */
int Cryptography_add_osrandom_engine(void) {
- ENGINE *osrandom_engine = ENGINE_by_id(Cryptography_osrandom_engine_id);
- if (osrandom_engine != NULL) {
- ENGINE_free(osrandom_engine);
+ ENGINE *e;
+ e = ENGINE_by_id(Cryptography_osrandom_engine_id);
+ if (e != NULL) {
+ ENGINE_free(e);
return 2;
} else {
ERR_clear_error();
}
- ENGINE *e = ENGINE_new();
+ e = ENGINE_new();
if (e == NULL) {
return 0;
}