about summary refs log tree commit diff
path: root/src/libwpactrl/wpactrl_xchg_computedeadline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwpactrl/wpactrl_xchg_computedeadline.c')
-rw-r--r--src/libwpactrl/wpactrl_xchg_computedeadline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libwpactrl/wpactrl_xchg_computedeadline.c b/src/libwpactrl/wpactrl_xchg_computedeadline.c
new file mode 100644
index 0000000..baaac77
--- /dev/null
+++ b/src/libwpactrl/wpactrl_xchg_computedeadline.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/tai.h>
+#include <bcnm/wpactrl.h>
+
+void wpactrl_xchg_computedeadline (wpactrl_xchg_t const *dt, tain_t *deadline)
+{
+  if (tain_less(&dt->deadline, deadline)) *deadline = dt->deadline ;
+}