X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_info.c;h=28bb4de1e8894ef3e4768a0fe47d84ad66ff7383;hb=b894ebf96ca888b9e3e13b2ab86a6c6f284b757c;hp=f9c4604274ab80325c679512e30b04f7f619c2e1;hpb=ea8c705cc27ef33dee2cc6561ed51e16ddc5d0a9;p=rrdtool.git diff --git a/src/rrd_info.c b/src/rrd_info.c index f9c4604..28bb4de 100644 --- a/src/rrd_info.c +++ b/src/rrd_info.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3rc5 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_info Get Information about the configuration of an RRD *****************************************************************************/ @@ -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); @@ -333,8 +334,6 @@ info_t *rrd_info_r( void info_print( info_t *data) { - long image_length = 0; - while (data) { printf("%s = ", data->key); @@ -354,7 +353,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;