From c66e82034b8a7a5fa7e375d0aadd6887e243aaf3 Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 31 Jul 2007 04:53:04 +0000 Subject: [PATCH] reindented git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1175 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/bindings/ruby/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/program/bindings/ruby/main.c b/program/bindings/ruby/main.c index d7618ee5..c5cf79ef 100644 --- a/program/bindings/ruby/main.c +++ b/program/bindings/ruby/main.c @@ -184,27 +184,27 @@ VALUE rb_rrd_graph( return result; } -VALUE rb_rrd_info(VALUE self, VALUE args) +VALUE rb_rrd_info( + VALUE self, + VALUE args) { string_arr a; - info_t *p, *data; - VALUE result; + info_t *p, *data; + VALUE result; a = string_arr_new(args); data = rrd_info(a.len, a.strings); string_arr_delete(a); - RRD_CHECK_ERROR - - result = rb_hash_new(); + RRD_CHECK_ERROR result = rb_hash_new(); while (data) { - VALUE key = rb_str_new2(data->key); + VALUE key = rb_str_new2(data->key); + switch (data->type) { case RD_I_VAL: if (isnan(data->value.u_val)) { rb_hash_aset(result, key, Qnil); - } - else { + } else { rb_hash_aset(result, key, rb_float_new(data->value.u_val)); } break; -- 2.30.2