]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: vars: Remove void vars_unset_by_name(const char*, size_t, struct sample*)
authorTim Duesterhus <tim@bastelstu.be>
Tue, 19 May 2020 11:49:39 +0000 (13:49 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 25 May 2020 06:12:23 +0000 (08:12 +0200)
With "MINOR: lua: Use vars_unset_by_name_ifexist()" the last user was
removed and as outlined in that commit there is no good reason for this
function to exist.

May be backported together with the commit mentioned above.

include/proto/vars.h
src/vars.c

index 6152f5c8b2875a571980aa194a8404b2585a0683..caf00ff685ac607cfc461b1b9a7521b88a02011c 100644 (file)
@@ -10,7 +10,6 @@ int vars_get_by_name(const char *name, size_t len, struct sample *smp);
 void vars_set_by_name_ifexist(const char *name, size_t len, struct sample *smp);
 void vars_set_by_name(const char *name, size_t len, struct sample *smp);
 void vars_unset_by_name_ifexist(const char *name, size_t len, struct sample *smp);
-void vars_unset_by_name(const char *name, size_t len, struct sample *smp);
 int vars_get_by_desc(const struct var_desc *var_desc, struct sample *smp);
 int vars_check_arg(struct arg *arg, char **err);
 
index a6807facdf6e654bbc4770220c43c8856becd654..08b1307f19c14036a94d6517df29aa8a30d25f5e 100644 (file)
@@ -584,21 +584,6 @@ void vars_unset_by_name_ifexist(const char *name, size_t len, struct sample *smp
 }
 
 
-/* This function unset a variable.
- * In error case, it fails silently.
- */
-void vars_unset_by_name(const char *name, size_t len, struct sample *smp)
-{
-       enum vars_scope scope;
-
-       /* Resolve name and scope. */
-       name = register_name(name, len, &scope, 1, NULL);
-       if (!name)
-               return;
-
-       sample_clear_stream(name, scope, smp);
-}
-
 /* this function fills a sample with the
  * variable content. Returns 1 if the sample
  * is filled, otherwise it returns 0.