summaryrefslogtreecommitdiff
path: root/cipher/md.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-07-02 13:40:15 +0000
committerWerner Koch <wk@gnupg.org>2009-07-02 13:40:15 +0000
commit72cf93388c0aedc50e66dc2ece236a919d4eaf42 (patch)
tree600a69920092a4153eca0220f7cafaf32e4367fe /cipher/md.c
parent70499fb90345a56f560d13e3f2a86a83e60edca6 (diff)
downloadlibgcrypt-72cf93388c0aedc50e66dc2ece236a919d4eaf42.tar.gz
Minor bug fixes.
Diffstat (limited to 'cipher/md.c')
-rw-r--r--cipher/md.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cipher/md.c b/cipher/md.c
index 5dfbbd95..9528f6d3 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -948,10 +948,13 @@ md_read( gcry_md_hd_t a, int algo )
if (! algo)
{
- /* return the first algorithm */
- if (r && r->next)
- log_debug ("more than one algorithm in md_read(0)\n");
- return r->digest->read( &r->context.c );
+ /* Return the first algorithm */
+ if (r)
+ {
+ if (r->next)
+ log_debug ("more than one algorithm in md_read(0)\n");
+ return r->digest->read (&r->context.c);
+ }
}
else
{