From 8570a2ccd887b0c382fb8bd11aed00c19a16e47d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 21 Feb 2010 18:33:14 +0100 Subject: fix msgb_talroom() calculation --- src/target/firmware/include/comm/msgb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/firmware') diff --git a/src/target/firmware/include/comm/msgb.h b/src/target/firmware/include/comm/msgb.h index f7c9d147..d9d518e8 100644 --- a/src/target/firmware/include/comm/msgb.h +++ b/src/target/firmware/include/comm/msgb.h @@ -82,7 +82,7 @@ static inline unsigned char *msgb_pull(struct msgb *msgb, unsigned int len) } static inline int msgb_tailroom(const struct msgb *msgb) { - return (msgb->data + msgb->data_len) - msgb->tail; + return (msgb->head + msgb->data_len) - msgb->tail; } /* increase the headroom of an empty msgb, reducing the tailroom */ -- cgit v1.2.3