r6688: removed unused binary_string() function
authorAndrew Tridgell <tridge@samba.org>
Tue, 10 May 2005 01:56:00 +0000 (01:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:34 +0000 (13:16 -0500)
(This used to be commit 0b48c69e0b94571173a12714b22d3d5e2af17bcf)

source4/lib/util_str.c

index 5d12a01f6ea8c13140537e2bc537667aa0dd51b6..69a4395cfb24901e1d311f5434cb53bbe83550a8 100644 (file)
@@ -852,29 +852,6 @@ size_t strlen_m_term(const char *s)
        return strlen_m(s) + 1;
 }
 
-/**
- Return a RFC2254 binary string representation of a buffer.
- Used in LDAP filters.
- Caller must free.
-**/
-char *binary_string(char *buf, int len)
-{
-       char *s;
-       int i, j;
-       const char *hex = "0123456789ABCDEF";
-       s = malloc(len * 3 + 1);
-       if (!s)
-               return NULL;
-       for (j=i=0;i<len;i++) {
-               s[j] = '\\';
-               s[j+1] = hex[((uint8_t)buf[i]) >> 4];
-               s[j+2] = hex[((uint8_t)buf[i]) & 0xF];
-               j += 3;
-       }
-       s[j] = 0;
-       return s;
-}
-
 /**
  Unescape a URL encoded string, in place.
 **/