summaryrefslogtreecommitdiff
path: root/lib/random.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-12-02 10:50:45 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-12-02 10:50:45 +0100
commit031083aed4431e98490930a30cea401ea0bed6cb (patch)
tree2412ef056832172a3e30e7356fbda600db8ec64d /lib/random.h
parentb5c9fcca016278aac15ae424f35e60a560767ba9 (diff)
downloadgnutls-031083aed4431e98490930a30cea401ea0bed6cb.tar.gz
if the rnd structure doesn't provide check, _gnutls_rnd_check() will succeed
Diffstat (limited to 'lib/random.h')
-rw-r--r--lib/random.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/random.h b/lib/random.h
index ee04549e55..59e3f3c0c4 100644
--- a/lib/random.h
+++ b/lib/random.h
@@ -50,7 +50,10 @@ int _gnutls_rnd_init(void);
inline static int _gnutls_rnd_check(void)
{
- return _gnutls_rnd_ops.check(gnutls_rnd_ctx);
+ if (_gnutls_rnd_ops.check)
+ return _gnutls_rnd_ops.check(gnutls_rnd_ctx);
+ else
+ return 0;
}
#ifndef _WIN32