From de89cf4915969778fa04e5bc68865cc825582635 Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 1 May 2008 23:23:35 +0000 Subject: [PATCH] indenting fixes git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1335 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/bindings/ruby/main.c | 4 +++- program/src/rrd.h | 4 ++-- program/src/rrd_info.c | 7 ++++--- program/src/rrd_tool.c | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/program/bindings/ruby/main.c b/program/bindings/ruby/main.c index e5a3e800..b3e512e8 100644 --- a/program/bindings/ruby/main.c +++ b/program/bindings/ruby/main.c @@ -174,7 +174,9 @@ VALUE rb_rrd_infocall( free(data->value.u_str); break; case RD_I_BLO: - rb_hash_aset(result, key, rb_str_new(data->value.u_blo.ptr,data->value.u_blo.size)); + rb_hash_aset(result, key, + rb_str_new(data->value.u_blo.ptr, + data->value.u_blo.size)); free(data->value.u_blo.ptr); break; } diff --git a/program/src/rrd.h b/program/src/rrd.h index 3e1a08ad..346836b2 100644 --- a/program/src/rrd.h +++ b/program/src/rrd.h @@ -88,8 +88,8 @@ extern "C" { /* rrd info interface */ typedef struct rrd_blob_t { - unsigned long size; /* size of the blob */ - unsigned char *ptr; /* pointer */ + unsigned long size; /* size of the blob */ + unsigned char *ptr; /* pointer */ } rrd_blob_t; enum info_type { RD_I_VAL = 0, diff --git a/program/src/rrd_info.c b/program/src/rrd_info.c index f9c46042..e0bcefa0 100644 --- a/program/src/rrd_info.c +++ b/program/src/rrd_info.c @@ -73,8 +73,9 @@ info_t break; case RD_I_BLO: next->value.u_blo.size = value.u_blo.size; - next->value.u_blo.ptr = malloc(sizeof(unsigned char)*value.u_blo.size); - memcpy(next->value.u_blo.ptr,value.u_blo.ptr,value.u_blo.size); + next->value.u_blo.ptr = + malloc(sizeof(unsigned char) * value.u_blo.size); + memcpy(next->value.u_blo.ptr, value.u_blo.ptr, value.u_blo.size); break; } return (next); @@ -354,7 +355,7 @@ void info_print( case RD_I_STR: printf("\"%s\"\n", data->value.u_str); break; - case RD_I_BLO: + case RD_I_BLO: printf("BLOB_SIZE:%lu\n", data->value.u_blo.size); fwrite(data->value.u_blo.ptr, data->value.u_blo.size, 1, stdout); break; diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index b16a1942..5eaf1058 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -803,6 +803,7 @@ int HandleInputLine( } else if (strcmp("graphv", argv[1]) == 0) { info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */ + if (grinfo = rrd_graph_v(argc - 1, &argv[1])) { info_print(grinfo); info_free(grinfo); -- 2.30.2