lib/util: Remove unused str_format_nbt_domain()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2012 01:49:45 +0000 (12:49 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 Feb 2012 05:45:13 +0000 (16:45 +1100)
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett

lib/util/samba_util.h
lib/util/util_str.c

index 5ce2e5e53528719580efa4bbea11924fc20d797a..8e8e7c1abd705af907dac5d7b09bc5e82cd4b5f4 100644 (file)
@@ -333,12 +333,6 @@ _PUBLIC_ char *rfc1738_escape_unescaped(TALLOC_CTX *mem_ctx, const char *url);
  **/
 _PUBLIC_ char *rfc1738_escape_part(TALLOC_CTX *mem_ctx, const char *url);
 
-/**
-  format a string into length-prefixed dotted domain format, as used in NBT
-  and in some ADS structures
-**/
-_PUBLIC_ const char *str_format_nbt_domain(TALLOC_CTX *mem_ctx, const char *s);
-
 /**
  * Add a string to an array of strings.
  *
index 388d7887ef6d1ca41747bc74d68f838272fce939..9379304cfb8935b3e27436c16bb30d6c5db09d5e 100644 (file)
  * @brief String utilities.
  **/
 
-/**
-  format a string into length-prefixed dotted domain format, as used in NBT
-  and in some ADS structures
-**/
-_PUBLIC_ const char *str_format_nbt_domain(TALLOC_CTX *mem_ctx, const char *s)
-{
-       char *ret;
-       int i;
-       if (!s || !*s) {
-               return talloc_strdup(mem_ctx, "");
-       }
-       ret = talloc_array(mem_ctx, char, strlen(s)+2);
-       if (!ret) {
-               return ret;
-       }
-       
-       memcpy(ret+1, s, strlen(s)+1);
-       ret[0] = '.';
-
-       for (i=0;ret[i];i++) {
-               if (ret[i] == '.') {
-                       char *p = strchr(ret+i+1, '.');
-                       if (p) {
-                               ret[i] = p-(ret+i+1);
-                       } else {
-                               ret[i] = strlen(ret+i+1);
-                       }
-               }
-       }
-
-       talloc_set_name_const(ret, ret);
-
-       return ret;
-}
-
 /**
  * Parse a string containing a boolean value.
  *