summaryrefslogtreecommitdiff
path: root/src/crypt.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-10-30 18:47:59 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-10-30 18:47:59 +0000
commitc7d75e3bd88ae9702ee538fc073d4116edc79f31 (patch)
tree660b885e2e9097802d451076d4f02825dc93d8e7 /src/crypt.c
parent022d8196cb2fee0cf8a1310aa2fbcabc9c463b90 (diff)
downloadgnutls-c7d75e3bd88ae9702ee538fc073d4116edc79f31.tar.gz
Added error checking to global_init() calls.
Diffstat (limited to 'src/crypt.c')
-rw-r--r--src/crypt.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/crypt.c b/src/crypt.c
index 40c665a867..e322bf0664 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -431,8 +431,16 @@ int main(int argc, char **argv)
int salt;
struct passwd *pwd;
- gnutls_global_init();
- gnutls_global_init_extra();
+ if ((ret=gnutls_global_init()) < 0) {
+ fprintf(stderr, "global_init: %s\n", gnutls_strerror(ret));
+ exit(1);
+ }
+
+ if ((ret=gnutls_global_init_extra()) < 0) {
+ fprintf(stderr,
+ "global_init_extra: %s\n", gnutls_strerror(ret));
+ exit(1);
+ }
if (gaa(argc, argv, &info) != -1) {
fprintf(stderr, "Error in the arguments.\n");