Review at  https://gerrit.osmocom.org/3469

add smpp34_tlv_for_each() helper

So we don't need to remember this is an opencoded list of TLVs.

Change-Id: I446929feed049d0411e1629ca263e2bc41f714cc
---
M src/smpp34_structs.h
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libsmpp34 refs/changes/69/3469/1

diff --git a/src/smpp34_structs.h b/src/smpp34_structs.h
index b9effb2..025109d 100644
--- a/src/smpp34_structs.h
+++ b/src/smpp34_structs.h
@@ -86,6 +86,9 @@
     OCTET16( inst, octet, size        ); \
 } par;
 
+#define smpp34_tlv_for_each(pos, head) \
+       for (pos = (head); pos != NULL; pos = pos->next)
+
 #define DAD( inst, par, do_dest_address ) dad_t *par;
 #define UU2( inst, par, size ) union { \
     struct { \

-- 
To view, visit https://gerrit.osmocom.org/3469
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I446929feed049d0411e1629ca263e2bc41f714cc
Gerrit-PatchSet: 1
Gerrit-Project: libsmpp34
Gerrit-Branch: master
Gerrit-Owner: Pablo Neira Ayuso <pa...@gnumonks.org>

Reply via email to