From e3be7f72da32514252efa014a2f35538319d098e 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/program@1335 a5681a0c-68f1-0310-ab6d-d61299d08faa --- bindings/ruby/main.c | 4 +++- src/rrd.h | 4 ++-- src/rrd_info.c | 7 ++++--- src/rrd_tool.c | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index e5a3e80..b3e512e 100644 --- a/bindings/ruby/main.c +++ b/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/src/rrd.h b/src/rrd.h index 3e1a08a..346836b 100644 --- a/src/rrd.h +++ b/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/src/rrd_info.c b/src/rrd_info.c index f9c4604..e0bcefa 100644 --- a/src/rrd_info.c +++ b/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/src/rrd_tool.c b/src/rrd_tool.c index b16a194..5eaf105 100644 --- a/src/rrd_tool.c +++ b/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.11.0