aboutsummaryrefslogtreecommitdiffstats
path: root/ossl_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'ossl_config.c')
-rw-r--r--ossl_config.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ossl_config.c b/ossl_config.c
index 6ba188b..548affc 100644
--- a/ossl_config.c
+++ b/ossl_config.c
@@ -1,7 +1,7 @@
/*
* $Id$
* 'OpenSSL for Ruby' project
- * Copyright (C) 2001 Michal Rokos <m.rokos@sh.cvut.cz>
+ * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
* All rights reserved.
*/
/*
@@ -66,7 +66,8 @@ ossl_config_s_load(int argc, VALUE* argv, VALUE klass)
if (err_line <= 0)
rb_raise(eConfigError, "wrong config file %s", RSTRING(path)->ptr);
else
- rb_raise(eConfigError, "error on line %ld in config file %s", err_line, RSTRING(path)->ptr);
+ rb_raise(eConfigError, "error on line %ld in config file %s",\
+ err_line, RSTRING(path)->ptr);
}
MakeConfig(obj, confp);
@@ -89,9 +90,9 @@ ossl_config_get_value(VALUE self, VALUE section, VALUE item)
}
Check_SafeStr(item);
- if (!(str = CONF_get_string(confp->config, sect, RSTRING(item)->ptr)))
+ if (!(str = CONF_get_string(confp->config, sect, RSTRING(item)->ptr))) {
OSSL_Raise(eConfigError, "");
-
+ }
return rb_str_new2(str);
}
@@ -110,9 +111,10 @@ ossl_config_get_section(VALUE self, VALUE section)
Check_SafeStr(section);
- if (!(sk = CONF_get_section(confp->config, RSTRING(section)->ptr)))
+ if (!(sk = CONF_get_section(confp->config, RSTRING(section)->ptr))) {
OSSL_Raise(eConfigError, "");
-
+ }
+
hash = rb_hash_new();
if ((entries = sk_CONF_VALUE_num(sk)) < 0) {
@@ -121,8 +123,7 @@ ossl_config_get_section(VALUE self, VALUE section)
}
for (i=0; i<entries; i++) {
- entry = sk_CONF_VALUE_value(sk, i);
-
+ entry = sk_CONF_VALUE_value(sk, i);
rb_hash_aset(hash, rb_str_new2(entry->name), rb_str_new2(entry->value));
}