diff options
author | Rob Austein <sra@hactrn.net> | 2012-08-31 22:09:31 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-08-31 22:09:31 +0000 |
commit | 4a1399c32ef8d67b7a79346aa487fb4cc80b32f6 (patch) | |
tree | 8394821a807488cd339f9ad8320fa281565807b0 | |
parent | 9645a4745a6c35c6606302004f91d74702092ba7 (diff) |
More cleanup.
svn path=/branches/tk274/; revision=4683
-rw-r--r-- | rpkid/ext/POW.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/rpkid/ext/POW.c b/rpkid/ext/POW.c index 67e10f9c..70b504d6 100644 --- a/rpkid/ext/POW.c +++ b/rpkid/ext/POW.c @@ -627,18 +627,17 @@ X509_object_helper_set_name(X509_NAME *name, PyObject *name_sequence) static PyObject * X509_object_helper_get_name(X509_NAME *name, int format) { - int no_entries = 0, no_pairs = 0, i = 0, j = 0, value_len = 0, nid = 0; - PyObject *result = NULL, *item = NULL; X509_NAME_ENTRY *entry = NULL; + PyObject *result = NULL; + PyObject *item = NULL; const char *oid = NULL; char oidbuf[512]; + int i; - no_entries = X509_NAME_entry_count(name); - - if ((result = PyTuple_New(no_entries)) == NULL) + if ((result = PyTuple_New(X509_NAME_entry_count(name))) == NULL) lose("could not allocate memory"); - for (i = 0; i < no_entries; i++) { + for (i = 0; i < X509_NAME_entry_count(name); i++) { if ((entry = X509_NAME_get_entry(name, i)) == NULL) lose("could not get certificate name"); |