mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
tdb: Use explicit initialization
Let the compiler figure out the optimal code Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
ec209d28a2
commit
c37bf2f938
@ -297,7 +297,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
|
||||
tdb_hash_func hash_fn)
|
||||
{
|
||||
int orig_errno = errno;
|
||||
struct tdb_header header;
|
||||
struct tdb_header header = {{0}};
|
||||
struct tdb_context *tdb;
|
||||
struct stat st;
|
||||
int rev = 0;
|
||||
@ -309,8 +309,6 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
|
||||
uint32_t magic1, magic2;
|
||||
int ret;
|
||||
|
||||
ZERO_STRUCT(header);
|
||||
|
||||
if (!(tdb = (struct tdb_context *)calloc(1, sizeof *tdb))) {
|
||||
/* Can't log this */
|
||||
errno = ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user