summaryrefslogtreecommitdiff
path: root/lib/random.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-07-02 15:24:05 +0200
committerSimon Josefsson <simon@josefsson.org>2008-07-02 15:24:05 +0200
commitbade988016aa5d2936c6bdf53570125181cfe2f9 (patch)
tree65948be9cd75ccfb8fd2a6c26ad15caed4119cc5 /lib/random.c
parent36f07088e2979bf28e52fec4992d3da04e73eb6c (diff)
downloadgnutls-bade988016aa5d2936c6bdf53570125181cfe2f9.tar.gz
Indent code.
Diffstat (limited to 'lib/random.c')
-rw-r--r--lib/random.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/lib/random.c b/lib/random.c
index 40b959b0bd..71174fa5d5 100644
--- a/lib/random.c
+++ b/lib/random.c
@@ -29,36 +29,40 @@
#include <gnutls_errors.h>
#include <random.h>
-static void * rnd_ctx;
+static void *rnd_ctx;
-int _gnutls_rnd_init ()
+int
+_gnutls_rnd_init ()
{
- if (_gnutls_rnd_ops.init != NULL) {
- if (_gnutls_rnd_ops.init(& rnd_ctx) < 0) {
- gnutls_assert();
- return GNUTLS_E_RANDOM_FAILED;
+ if (_gnutls_rnd_ops.init != NULL)
+ {
+ if (_gnutls_rnd_ops.init (&rnd_ctx) < 0)
+ {
+ gnutls_assert ();
+ return GNUTLS_E_RANDOM_FAILED;
+ }
}
- }
-
+
return 0;
}
void
_gnutls_rnd_deinit ()
{
- if (_gnutls_rnd_ops.deinit != NULL) {
- _gnutls_rnd_ops.deinit( rnd_ctx);
- }
-
+ if (_gnutls_rnd_ops.deinit != NULL)
+ {
+ _gnutls_rnd_ops.deinit (rnd_ctx);
+ }
+
return;
}
int
_gnutls_rnd (int level, void *data, int len)
{
- if (len > 0) {
- return _gnutls_rnd_ops.rnd( rnd_ctx, level, data, len);
- }
+ if (len > 0)
+ {
+ return _gnutls_rnd_ops.rnd (rnd_ctx, level, data, len);
+ }
return 0;
}
-