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;
}
/* 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,
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);
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;
} 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);