diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-11 20:09:13 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-11 20:09:13 +0200 |
commit | 9fa0912e5b8c38bd4ea973cd7224a5a8b4b26c5f (patch) | |
tree | 8bc5cf54c262c12ec40b45b50e31ba711bb873b5 /include | |
parent | 4eeb808c4359595814b7f1831376cf71b54e7e84 (diff) |
msgb: msgb_get: Drop unneeded tmp var
Change-Id: I27bb2ab59408c9cd1363b3b5acb2263128c55732
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/msgb.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index 374ddbe3..a9831957 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -230,13 +230,12 @@ 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->tail - len; if (msgb_length(msgb) < len) MSGB_ABORT(msgb, "msgb too small to get %u (len %u)\n", len, msgb_length(msgb)); msgb->tail -= len; msgb->len -= len; - return tmp; + return msgb->tail; } /*! remove uint8 from end of message |