mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
lib: Remove unused talloc_append_blob
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
8ca3a58ec9
commit
79f946cdb6
@ -410,7 +410,6 @@ bool mask_match_search(const char *string, const char *pattern, bool is_case_sen
|
||||
bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
|
||||
bool unix_wild_match(const char *pattern, const char *string);
|
||||
bool name_to_fqdn(fstring fqdn, const char *name);
|
||||
void *talloc_append_blob(TALLOC_CTX *mem_ctx, void *buf, DATA_BLOB blob);
|
||||
uint32_t map_share_mode_to_deny_mode(uint32_t share_access, uint32_t private_options);
|
||||
|
||||
#include "lib/util_procid.h"
|
||||
|
@ -1818,32 +1818,6 @@ bool name_to_fqdn(fstring fqdn, const char *name)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
Append a DATA_BLOB to a talloc'ed object
|
||||
***********************************************************************/
|
||||
|
||||
void *talloc_append_blob(TALLOC_CTX *mem_ctx, void *buf, DATA_BLOB blob)
|
||||
{
|
||||
size_t old_size = 0;
|
||||
char *result;
|
||||
|
||||
if (blob.length == 0) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
if (buf != NULL) {
|
||||
old_size = talloc_get_size(buf);
|
||||
}
|
||||
|
||||
result = (char *)TALLOC_REALLOC(mem_ctx, buf, old_size + blob.length);
|
||||
if (result == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(result + old_size, blob.data, blob.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t map_share_mode_to_deny_mode(uint32_t share_access, uint32_t private_options)
|
||||
{
|
||||
switch (share_access & ~FILE_SHARE_DELETE) {
|
||||
|
Loading…
Reference in New Issue
Block a user