The flt_ot_var_unset() function is not used anywhere and is unnecessary
in the existing implementation of the OpenTracing filter.

--
Miroslav Zagorac
Senior Developer
>From 6f75cb4adc0d2ffa661fe861cc0986aaf99450b5 Mon Sep 17 00:00:00 2001
From: Miroslav Zagorac <[email protected]>
Date: Tue, 1 Mar 2022 18:38:37 +0100
Subject: [PATCH 03/16] CLEANUP: opentracing: removed unused function
 flt_ot_var_unset()

The flt_ot_var_unset() function is not used anywhere and is unnecessary
in the existing implementation of the OpenTracing filter.
---
 addons/ot/include/vars.h |  1 -
 addons/ot/src/vars.c     | 39 ---------------------------------------
 2 files changed, 40 deletions(-)

diff --git a/addons/ot/include/vars.h b/addons/ot/include/vars.h
index 5ce88794a..da1a04986 100644
--- a/addons/ot/include/vars.h
+++ b/addons/ot/include/vars.h
@@ -32,7 +32,6 @@ void                 flt_ot_vars_dump(struct stream *s);
 #endif
 int                  flt_ot_var_register(const char *scope, const char *prefix, const char *name, char **err);
 int                  flt_ot_var_set(struct stream *s, const char *scope, const char *prefix, const char *name, const char *value, uint opt, char **err);
-int                  flt_ot_var_unset(struct stream *s, const char *scope, const char *prefix, const char *name, uint opt, char **err);
 int                  flt_ot_vars_unset(struct stream *s, const char *scope, const char *prefix, uint opt, char **err);
 int                  flt_ot_var_get(struct stream *s, const char *scope, const char *prefix, const char *name, char **value, uint opt, char **err);
 struct otc_text_map *flt_ot_vars_get(struct stream *s, const char *scope, const char *prefix, uint opt, char **err);
diff --git a/addons/ot/src/vars.c b/addons/ot/src/vars.c
index f8a58d68a..1a8244c46 100644
--- a/addons/ot/src/vars.c
+++ b/addons/ot/src/vars.c
@@ -312,45 +312,6 @@ int flt_ot_var_set(struct stream *s, const char *scope, const char *prefix, cons
 }
 
 
-/***
- * NAME
- *   flt_ot_var_unset -
- *
- * ARGUMENTS
- *   s      -
- *   scope  -
- *   prefix -
- *   name   -
- *   opt    -
- *   err    -
- *
- * DESCRIPTION
- *   -
- *
- * RETURN VALUE
- *   -
- */
-int flt_ot_var_unset(struct stream *s, const char *scope, const char *prefix, const char *name, uint opt, char **err)
-{
-	struct sample smp;
-	char          var_name[BUFSIZ];
-	int           retval;
-
-	FLT_OT_FUNC("%p, \"%s\", \"%s\", \"%s\", %u, %p:%p", s, scope, prefix, name, opt, FLT_OT_DPTR_ARGS(err));
-
-	retval = flt_ot_var_name(scope, prefix, name, var_name, sizeof(var_name), err);
-	if (retval == -1)
-		FLT_OT_RETURN(retval);
-
-	(void)memset(&smp, 0, sizeof(smp));
-	(void)smp_set_owner(&smp, s->be, s->sess, s, opt | SMP_OPT_FINAL);
-
-	vars_unset_by_name_ifexist(var_name, retval, &smp);
-
-	FLT_OT_RETURN(retval);
-}
-
-
 /***
  * NAME
  *   flt_ot_vars_unset -
-- 
2.30.2

Reply via email to