From 9b3cefca217759b52ac1dc5254a0b574229c2be5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 11 Aug 2017 12:11:46 +0200 Subject: [PATCH] add smpp34_tlv_for_each() helper So we don't need to remember this is an opencoded list of TLVs. Change-Id: I446929feed049d0411e1629ca263e2bc41f714cc --- src/smpp34_structs.h | 3 +++ 1 file changed, 3 insertions(+) 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 @@ typedef struct alert_notification_t alert_notification_t; 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 { \