diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-05-27 14:00:46 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-05-27 14:00:46 +0400 |
commit | e620fdac652e1cbb6a22b5a2cb1ce8edd29bd3b8 (patch) | |
tree | 9688250236e6302050b84270aeea035e1de70db1 /src/core/ngx_md5.c | |
parent | c4793b650579a0475e7d2e61d1530887962bdb7e (diff) |
make built-in ngx_md5_update() interface consistent with other implemenations
Diffstat (limited to 'src/core/ngx_md5.c')
-rw-r--r-- | src/core/ngx_md5.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/ngx_md5.c b/src/core/ngx_md5.c index 30ab0a0f6..519b2d183 100644 --- a/src/core/ngx_md5.c +++ b/src/core/ngx_md5.c @@ -32,7 +32,7 @@ ngx_md5_init(ngx_md5_t *ctx) void -ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size) +ngx_md5_update(ngx_md5_t *ctx, const void *data, size_t size) { size_t used, free; @@ -47,8 +47,7 @@ ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size) return; } - ngx_memcpy(&ctx->buffer[used], data, free); - data = (u_char *)data + free; + data = ngx_cpymem(&ctx->buffer[used], data, free); size -= free; (void) ngx_md5_body(ctx, ctx->buffer, 64); } |