summaryrefslogtreecommitdiffstats
path: root/Modules/sha1module.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/sha1module.c')
-rw-r--r--Modules/sha1module.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/sha1module.c b/Modules/sha1module.c
index f824bb3..824024c 100644
--- a/Modules/sha1module.c
+++ b/Modules/sha1module.c
@@ -92,10 +92,6 @@ typedef struct {
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
-#ifndef MIN
- #define MIN(x, y) ( ((x)<(y))?(x):(y) )
-#endif
-
/* SHA1 macros */
@@ -220,9 +216,9 @@ sha1_process(struct sha1_state *sha1,
in += SHA1_BLOCKSIZE;
inlen -= SHA1_BLOCKSIZE;
} else {
- n = MIN(inlen, (Py_ssize_t)(SHA1_BLOCKSIZE - sha1->curlen));
+ n = Py_MIN(inlen, (Py_ssize_t)(SHA1_BLOCKSIZE - sha1->curlen));
memcpy(sha1->buf + sha1->curlen, in, (size_t)n);
- sha1->curlen += n;
+ sha1->curlen += (SHA1_INT32)n;
in += n;
inlen -= n;
if (sha1->curlen == SHA1_BLOCKSIZE) {