From 4a1399c32ef8d67b7a79346aa487fb4cc80b32f6 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 31 Aug 2012 22:09:31 +0000 Subject: More cleanup. svn path=/branches/tk274/; revision=4683 --- rpkid/ext/POW.c | 11 +++++------ 1 file 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"); -- cgit v1.2.3