s3: Remove some unused code
authorVolker Lendecke <vl@samba.org>
Mon, 14 Mar 2011 07:10:13 +0000 (08:10 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 08:15:36 +0000 (09:15 +0100)
source3/include/proto.h
source3/lib/util_str.c

index 199ee4836cb19a4fb5ff1aac798e35f726804a8c..2cb21f5ab67bf93622cafe6cc3908c333131d991 100644 (file)
@@ -1435,8 +1435,6 @@ size_t strlen_m_ext_term(const char *s, const charset_t src_charset,
 size_t strlen_m(const char *s);
 size_t strlen_m_term(const char *s);
 size_t strlen_m_term_null(const char *s);
-char *binary_string_rfc2254(TALLOC_CTX *mem_ctx, const uint8_t *buf, int len);
-char *binary_string(char *buf, int len);
 int fstr_sprintf(fstring s, const char *fmt, ...);
 bool str_list_sub_basic( char **list, const char *smb_name,
                         const char *domain_name );
index b26bde81c471d90a960ffe102f880b5ea6a4deff..6a17297231aa95ee5c31dca7d788e800cb164d26 100644 (file)
@@ -1576,47 +1576,6 @@ size_t strlen_m_term_null(const char *s)
 
        return len+1;
 }
-/**
- Return a RFC2254 binary string representation of a buffer.
- Used in LDAP filters.
- Caller must free.
-**/
-
-char *binary_string_rfc2254(TALLOC_CTX *mem_ctx, const uint8_t *buf, int len)
-{
-       char *s;
-       int i, j;
-       const char *hex = "0123456789ABCDEF";
-       s = talloc_array(mem_ctx, char, len * 3 + 1);
-       if (s == NULL) {
-               return NULL;
-       }
-       for (j=i=0;i<len;i++) {
-               s[j] = '\\';
-               s[j+1] = hex[((unsigned char)buf[i]) >> 4];
-               s[j+2] = hex[((unsigned char)buf[i]) & 0xF];
-               j += 3;
-       }
-       s[j] = 0;
-       return s;
-}
-
-char *binary_string(char *buf, int len)
-{
-       char *s;
-       int i, j;
-       const char *hex = "0123456789ABCDEF";
-       s = (char *)SMB_MALLOC(len * 2 + 1);
-       if (!s)
-               return NULL;
-       for (j=i=0;i<len;i++) {
-               s[j]   = hex[((unsigned char)buf[i]) >> 4];
-               s[j+1] = hex[((unsigned char)buf[i]) & 0xF];
-               j += 2;
-       }
-       s[j] = 0;
-       return s;
-}
 
 /**
  Just a typesafety wrapper for snprintf into a fstring.