diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-01-02 14:10:25 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-01-02 14:10:25 +0200 |
commit | 2a27a8fcdb33c69ead5df3701239c8d97c8c6e70 (patch) | |
tree | 43ee5dcdf67056e46c42979a6d6efe12f5e72512 /rpmio/digest.c | |
parent | 519eaaf236866602e1f05cf138ebb263b465f2b7 (diff) | |
download | librpm-tizen-2a27a8fcdb33c69ead5df3701239c8d97c8c6e70.tar.gz librpm-tizen-2a27a8fcdb33c69ead5df3701239c8d97c8c6e70.tar.bz2 librpm-tizen-2a27a8fcdb33c69ead5df3701239c8d97c8c6e70.zip |
More assorted int -> size_t uses
Diffstat (limited to 'rpmio/digest.c')
-rw-r--r-- | rpmio/digest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rpmio/digest.c b/rpmio/digest.c index 10ed6d138..25e5dfa60 100644 --- a/rpmio/digest.c +++ b/rpmio/digest.c @@ -98,17 +98,17 @@ DPRINTF((stderr, "*** Init(%x) ctx %p hashctx %p\n", flags, ctx, ctx->hashctx)); int rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len) { - unsigned int partlen; + size_t partlen; const unsigned char *ptr = data; if (ctx == NULL) return -1; -DPRINTF((stderr, "*** Update(%p,%p,%d) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); +DPRINTF((stderr, "*** Update(%p,%p,%zd) hashctx %p \"%s\"\n", ctx, data, len, ctx->hashctx, ((char *)data))); partlen = ~(unsigned int)0xFF; while (len > 0) { if (len < partlen) { - partlen = (unsigned int)len; + partlen = len; } HASH_Update(ctx->hashctx, ptr, partlen); ptr += partlen; @@ -122,15 +122,15 @@ rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii) { unsigned char * digest; char * t; - int i; - unsigned int digestlen; + size_t i; + size_t digestlen; if (ctx == NULL) return -1; digestlen = HASH_ResultLenContext(ctx->hashctx); digest = xmalloc(digestlen); -DPRINTF((stderr, "*** Final(%p,%p,%p,%d) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); +DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); /* FIX: check rc */ HASH_End(ctx->hashctx, digest, &digestlen, digestlen); |