mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
s3: Remove some unused code
This commit is contained in:
parent
a4d7b3a1df
commit
b0667f7fda
@ -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 );
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user