summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/msgb.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-10-26 20:14:04 +0100
committerHarald Welte <laforge@gnumonks.org>2014-10-26 20:14:04 +0100
commita97ebc9599d4b3210d7127a2cc75d552e69eeb9a (patch)
tree60eee24f5b78ad5115b21cb9996406e5cbf4fd3d /include/osmocom/core/msgb.h
parent42645d7d78a22db7b76039407b7b43bc0cc79c54 (diff)
parent534163badec879a644af985c9f5d04b7c957a355 (diff)
Merge branch 'laforge/sim'
This contains some work from 2012 about creating a general library about the data structure of data contained on SIM cards. This 'libosmosim' is supposed to be used by (among others) * tools to review/modify/personalize SIM card filesystem data * virtual SIM card implementation
Diffstat (limited to 'include/osmocom/core/msgb.h')
-rw-r--r--include/osmocom/core/msgb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 19e4a3d0..644a6391 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -224,7 +224,7 @@ static inline void msgb_put_u32(struct msgb *msgb, uint32_t word)
*/
static inline unsigned char *msgb_get(struct msgb *msgb, unsigned int len)
{
- unsigned char *tmp = msgb->data - len;
+ unsigned char *tmp = msgb->tail - len;
if (msgb_length(msgb) < len)
MSGB_ABORT(msgb, "msgb too small to get %u (len %u)\n",
len, msgb_length(msgb));