summaryrefslogtreecommitdiff
path: root/btt/inlines.h
diff options
context:
space:
mode:
authorAlan D. Brunelle <alan.brunelle@hp.com>2009-02-13 12:43:45 -0500
committerAlan D. Brunelle <alan.brunelle@hp.com>2009-02-13 12:43:45 -0500
commitc053af429559c8f4311cd773262ff223097cdcb3 (patch)
treee54213ccebb11d9dafce4d8376e4027983afb48d /btt/inlines.h
parent8f34184f8c7905bb929862d224a7c4969bc9190e (diff)
downloadblktrace-c053af429559c8f4311cd773262ff223097cdcb3.tar.gz
blktrace-c053af429559c8f4311cd773262ff223097cdcb3.tar.bz2
btt general cleanup plus valgrind clean
Lots of general clean up of code, getting interfaces across different files to be similar (all are no alloc/free), and made it valgrind clean. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com
Diffstat (limited to 'btt/inlines.h')
-rw-r--r--btt/inlines.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/btt/inlines.h b/btt/inlines.h
index 2af70fb..64b5a2c 100644
--- a/btt/inlines.h
+++ b/btt/inlines.h
@@ -97,8 +97,7 @@ static inline void avg_update_n(struct avg_info *ap, __u64 t, int n)
if (ap->n == 0) {
ap->min = ap->max = t;
ap->total = (n * t);
- }
- else {
+ } else {
if (t < ap->min)
ap->min = t;
else if (t > ap->max)
@@ -161,7 +160,7 @@ static inline void io_free_all(void)
static inline int io_setup(struct io *iop, enum iop_type type)
{
iop->type = type;
- iop->dip = dip_add(iop->t.device, iop);
+ iop->dip = dip_alloc(iop->t.device, iop);
if (iop->linked) {
iop->pip = find_process(iop->t.pid, NULL);
iop->bytes_left = iop->t.bytes;
@@ -173,7 +172,7 @@ static inline int io_setup(struct io *iop, enum iop_type type)
static inline void io_release(struct io *iop)
{
if (iop->linked)
- dip_rem(iop);
+ iop_rem_dip(iop);
if (iop->pdu)
free(iop->pdu);