From: Alan T. DeKok Date: Fri, 3 Dec 2021 20:08:08 +0000 (-0500) Subject: add insert pair before function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82ae08c6c6fa50b0a67dacd51e14dea8328ab313;p=thirdparty%2Ffreeradius-server.git add insert pair before function --- diff --git a/src/lib/util/edit.h b/src/lib/util/edit.h index 0d847ea6fcc..5ca064fe908 100644 --- a/src/lib/util/edit.h +++ b/src/lib/util/edit.h @@ -42,6 +42,8 @@ void fr_edit_list_abort(fr_edit_list_t *el); /* * Functions to modify #fr_pair_t */ +#define fr_edit_list_insert_pair_before(_el, _list, _pos, _vp) fr_edit_list_insert_pair_after(_el, _list, fr_pair_list_prev(_list, _pos), _vp) + int fr_edit_list_insert_pair_after(fr_edit_list_t *el, fr_pair_list_t *list, fr_pair_t *pos, fr_pair_t *vp) CC_HINT(nonnull(2,4)); #define fr_edit_list_insert_pair_head(_el, _list, _vp) fr_edit_list_insert_after(_el, _list, NULL, _vp)