##// END OF EJS Templates
sha1dc: declare all variables at begininng of block...
Gregory Szorc -
r44541:c3f741bb default
parent child Browse files
Show More
@@ -84,13 +84,14 b' static PyObject *pysha1ctx_digest(pysha1'
84 84
85 85 static PyObject *pysha1ctx_hexdigest(pysha1ctx *self)
86 86 {
87 static const char hexdigit[] = "0123456789abcdef";
87 88 unsigned char hash[20];
89 char hexhash[40];
90 int i;
88 91 if (!finalize(self->ctx, hash)) {
89 92 return NULL;
90 93 }
91 char hexhash[40];
92 static const char hexdigit[] = "0123456789abcdef";
93 for (int i = 0; i < 20; ++i) {
94 for (i = 0; i < 20; ++i) {
94 95 hexhash[i * 2] = hexdigit[hash[i] >> 4];
95 96 hexhash[i * 2 + 1] = hexdigit[hash[i] & 15];
96 97 }
General Comments 0
You need to be logged in to leave comments. Login now