mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Fix clang 9 missing-field-initializer warnings
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
c2b0071460
commit
13a2f70a4d
@ -1252,7 +1252,7 @@ static PyObject *py_ccache_name(PyObject *self, PyObject *unused)
|
||||
static PyMethodDef py_ccache_container_methods[] = {
|
||||
{ "get_name", py_ccache_name, METH_NOARGS,
|
||||
"S.get_name() -> name\nObtain KRB5 credentials cache name." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
PyTypeObject PyCredentialCacheContainer = {
|
||||
|
@ -793,7 +793,6 @@ int main(void) {
|
||||
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=cast-align', testflags=True)
|
||||
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=format-nonliteral', testflags=True)
|
||||
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=for-loop-analysis', testflags=True)
|
||||
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=missing-field-initializers', testflags=True)
|
||||
|
||||
if Options.options.fatal_errors:
|
||||
conf.ADD_CFLAGS('-Wfatal-errors', testflags=True)
|
||||
|
@ -65,9 +65,7 @@ int main(int argc, const char *argv[])
|
||||
"contextauth", 'C', POPT_ARG_NONE, &context_auth,
|
||||
0, "Use new authentication function with context", "integer"
|
||||
},
|
||||
{
|
||||
NULL
|
||||
}
|
||||
{0}
|
||||
};
|
||||
|
||||
setbuf(stdout, NULL);
|
||||
|
@ -91,7 +91,7 @@ static const char py_crypto_arcfour_crypt_blob_doc[] = "arcfour_crypt_blob(data,
|
||||
|
||||
static PyMethodDef py_crypto_methods[] = {
|
||||
{ "arcfour_crypt_blob", (PyCFunction)py_crypto_arcfour_crypt_blob, METH_VARARGS, py_crypto_arcfour_crypt_blob_doc },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -266,7 +266,7 @@ static PyMethodDef py_samba_ldb_methods[] = {
|
||||
{ "samba_schema_attribute_add",
|
||||
(PyCFunction)py_ldb_samba_schema_attribute_add,
|
||||
METH_VARARGS, NULL },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -41,7 +41,7 @@
|
||||
static unsigned calculate_popt_array_length(struct poptOption *opts)
|
||||
{
|
||||
unsigned i;
|
||||
struct poptOption zero_opt = { NULL };
|
||||
struct poptOption zero_opt = { 0 };
|
||||
for (i=0; memcmp(&zero_opt, &opts[i], sizeof(zero_opt)) != 0; i++) ;
|
||||
return i;
|
||||
}
|
||||
@ -51,7 +51,7 @@ static struct poptOption cmdline_extensions[] = {
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_CONNECTION
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -730,7 +730,7 @@ static PyObject *py_ldb_dn_set_component(PyLdbDnObject *self, PyObject *args)
|
||||
{
|
||||
unsigned int num = 0;
|
||||
char *name = NULL, *value = NULL;
|
||||
struct ldb_val val = { NULL, };
|
||||
struct ldb_val val = { 0 };
|
||||
int err;
|
||||
Py_ssize_t size = 0;
|
||||
|
||||
@ -847,7 +847,7 @@ static PyMethodDef py_ldb_dn_methods[] = {
|
||||
{ "get_rdn_value", (PyCFunction)py_ldb_dn_get_rdn_value, METH_NOARGS,
|
||||
"S.get_rdn_value() -> string\n"
|
||||
"get the RDN attribute value as a binary string" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static Py_ssize_t py_ldb_dn_len(PyLdbDnObject *self)
|
||||
@ -2398,7 +2398,7 @@ static PyMethodDef py_ldb_methods[] = {
|
||||
{ "_register_test_extensions", (PyCFunction)py_ldb_register_test_extensions, METH_NOARGS,
|
||||
"S._register_test_extensions() -> None\n"
|
||||
"Register internal extensions used in testing" },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *PyLdbModule_FromModule(struct ldb_module *mod)
|
||||
@ -2725,7 +2725,7 @@ static PyMethodDef py_ldb_search_iterator_methods[] = {
|
||||
"S.result() -> ldb.Result (without msgs and referrals)\n" },
|
||||
{ "abandon", (PyCFunction)py_ldb_search_iterator_abandon, METH_NOARGS,
|
||||
"S.abandon()\n" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyObject *py_ldb_search_iterator_repr(PyLdbSearchIteratorObject *self)
|
||||
@ -2920,7 +2920,7 @@ static PyMethodDef py_ldb_module_methods[] = {
|
||||
{ "start_transaction", (PyCFunction)py_ldb_module_start_transaction, METH_NOARGS, NULL },
|
||||
{ "end_transaction", (PyCFunction)py_ldb_module_end_transaction, METH_NOARGS, NULL },
|
||||
{ "del_transaction", (PyCFunction)py_ldb_module_del_transaction, METH_NOARGS, NULL },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static void py_ldb_module_dealloc(PyLdbModuleObject *self)
|
||||
@ -3098,7 +3098,7 @@ static PyMethodDef py_ldb_msg_element_methods[] = {
|
||||
{ "get", (PyCFunction)py_ldb_msg_element_get, METH_VARARGS, NULL },
|
||||
{ "set_flags", (PyCFunction)py_ldb_msg_element_set_flags, METH_VARARGS, NULL },
|
||||
{ "flags", (PyCFunction)py_ldb_msg_element_flags, METH_NOARGS, NULL },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static Py_ssize_t py_ldb_msg_element_len(PyLdbMessageElementObject *self)
|
||||
@ -3603,7 +3603,7 @@ static PyMethodDef py_ldb_msg_methods[] = {
|
||||
{ "add", (PyCFunction)py_ldb_msg_add, METH_VARARGS,
|
||||
"S.add(element)\n\n"
|
||||
"Add an element to this message." },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *py_ldb_msg_iter(PyLdbMessageObject *self)
|
||||
@ -4280,7 +4280,7 @@ static PyMethodDef py_ldb_global_methods[] = {
|
||||
{ "binary_decode", py_binary_decode, METH_VARARGS,
|
||||
"S.binary_decode(string) -> string\n\n"
|
||||
"Perform a RFC2254 binary decode on a string" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
#define MODULE_DOC "An interface to LDB, a LDAP-like API that can either to talk an embedded database (TDB-based) or a standards-compliant LDAP server."
|
||||
|
@ -59,7 +59,7 @@ static struct poptOption builtin_popt_options[] = {
|
||||
{ "relax", 0, POPT_ARG_NONE, NULL, CMDLINE_RELAX, "pass relax control", NULL },
|
||||
{ "cross-ncs", 0, POPT_ARG_NONE, NULL, 'N', "search across NC boundaries", NULL },
|
||||
{ "extended-dn", 0, POPT_ARG_NONE, NULL, 'E', "show extended DNs", NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
void ldb_cmdline_help(struct ldb_context *ldb, const char *cmdname, FILE *f)
|
||||
|
@ -70,7 +70,7 @@ static PyMethodDef talloc_methods[] = {
|
||||
"enable tracking of the NULL object"},
|
||||
{ "total_blocks", (PyCFunction)pytalloc_total_blocks, METH_VARARGS,
|
||||
"return talloc block count"},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -95,7 +95,7 @@ static PyMethodDef test_talloc_methods[] = {
|
||||
"call pytalloc_reference_ex"},
|
||||
{ "base_reference", (PyCFunction)testpytalloc_base_reference, METH_VARARGS,
|
||||
"call pytalloc_reference_ex"},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyTypeObject DObject_Type;
|
||||
|
@ -589,7 +589,7 @@ static PyMethodDef tdb_object_methods[] = {
|
||||
"S.enable_seqnum() -> None" },
|
||||
{ "increment_seqnum_nonblock", (PyCFunction)obj_increment_seqnum_nonblock, METH_NOARGS,
|
||||
"S.increment_seqnum_nonblock() -> None" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyObject *obj_get_hash_size(PyTdbObject *self, void *closure)
|
||||
|
@ -269,7 +269,7 @@ static PyMethodDef py_tevent_queue_methods[] = {
|
||||
"S.start()" },
|
||||
{ "add", (PyCFunction)py_tevent_queue_add, METH_VARARGS,
|
||||
"S.add(ctx, req, trigger, baton)" },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *py_tevent_context_wakeup_send(PyObject *self, PyObject *args)
|
||||
@ -394,7 +394,7 @@ struct PyGetSetDef py_tevent_timer_getset[] = {
|
||||
.get = (getter)py_tevent_timer_get_active,
|
||||
.doc = discard_const_p(char, "true if the timer is scheduled to run"),
|
||||
},
|
||||
{NULL},
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyTypeObject TeventTimer_Type = {
|
||||
@ -576,7 +576,7 @@ static PyMethodDef py_tevent_context_methods[] = {
|
||||
METH_VARARGS, "S.add_timer(offset_seconds, handler) -> timer" },
|
||||
{ "add_fd", (PyCFunction)py_tevent_context_add_fd,
|
||||
METH_VARARGS, "S.add_fd(fd, flags, handler) -> fd" },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *py_tevent_req_wakeup_recv(PyObject *self,
|
||||
@ -620,7 +620,7 @@ static PyGetSetDef py_tevent_req_getsetters[] = {
|
||||
.get = (getter)py_tevent_req_is_in_progress,
|
||||
.doc = discard_const_p(char, "Whether the request is in progress"),
|
||||
},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyObject *py_tevent_req_post(PyObject *self, PyObject *args)
|
||||
@ -688,7 +688,7 @@ static PyMethodDef py_tevent_req_methods[] = {
|
||||
METH_VARARGS, "set_endtime(ctx, endtime)" },
|
||||
{ "cancel", (PyCFunction)py_tevent_req_cancel,
|
||||
METH_NOARGS, "cancel()" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static void py_tevent_req_dealloc(TeventReq_Object *self)
|
||||
@ -718,7 +718,7 @@ static PyGetSetDef py_tevent_queue_getsetters[] = {
|
||||
.get = (getter)py_tevent_queue_get_length,
|
||||
.doc = discard_const_p(char, "The number of elements in the queue."),
|
||||
},
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static void py_tevent_queue_dealloc(TeventQueue_Object *self)
|
||||
@ -750,7 +750,7 @@ static PyGetSetDef py_tevent_context_getsetters[] = {
|
||||
py_tevent_context_signal_support),
|
||||
.doc = discard_const_p(char, "if this platform and tevent context support signal handling"),
|
||||
},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static void py_tevent_context_dealloc(TeventContext_Object *self)
|
||||
@ -861,7 +861,7 @@ static PyMethodDef tevent_methods[] = {
|
||||
METH_VARARGS, "set_default_backend(backend)" },
|
||||
{ "backend_list", (PyCFunction)py_backend_list,
|
||||
METH_NOARGS, "backend_list() -> list" },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
#define MODULE_DOC PyDoc_STR("Python wrapping of talloc-maintained objects.")
|
||||
|
@ -409,7 +409,7 @@ static PyMethodDef py_nbt_methods[] = {
|
||||
"S.name_status(name, dest, timeout=0, retries=0) -> (reply_from, name, status)\n"
|
||||
"Find the status of a name" },
|
||||
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
PyTypeObject nbt_node_Type = {
|
||||
|
@ -73,7 +73,7 @@ static PyMethodDef py_security_methods[] = {
|
||||
py_se_access_check),
|
||||
METH_VARARGS|METH_KEYWORDS,
|
||||
"access_check(security_descriptor, token, access_desired) -> access_granted. Raises NT_STATUS on error, including on access check failure, returns access granted bitmask"},
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -67,7 +67,7 @@ static PyGetSetDef GPO_setters[] = {
|
||||
NULL, NULL, NULL},
|
||||
{discard_const_p(char, "machine_extensions"),
|
||||
(getter)GPO_get_machine_extensions, NULL, NULL, NULL},
|
||||
{NULL}
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args,
|
||||
@ -120,7 +120,7 @@ static PyMethodDef GPO_methods[] = {
|
||||
py_gpo_get_unix_path),
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
NULL },
|
||||
{NULL}
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyTypeObject GPOType = {
|
||||
@ -493,7 +493,7 @@ static PyMethodDef ADS_methods[] = {
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
NULL },
|
||||
#endif
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyTypeObject ads_ADSType = {
|
||||
@ -510,7 +510,7 @@ static PyMethodDef py_gpo_methods[] = {
|
||||
{"gpo_get_sysvol_gpt_version",
|
||||
(PyCFunction)py_gpo_get_sysvol_gpt_version,
|
||||
METH_VARARGS, NULL},
|
||||
{NULL}
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -316,7 +316,7 @@ static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
|
||||
"Try to print structures that fail to parse (used to develop parsers, segfaults are likely).", NULL },
|
||||
POPT_COMMON_SAMBA
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
uint32_t highest_ofs;
|
||||
struct dcerpc_sec_verification_trailer *sec_vt = NULL;
|
||||
|
@ -1419,7 +1419,7 @@ sub Interface($$$)
|
||||
my ($infn, $outfn, $callfn, $prettyname, $docstring, $opnum) = @$d;
|
||||
$self->pidl("{ \"$prettyname\", $docstring, (py_dcerpc_call_fn)$callfn, (py_data_pack_fn)$infn, (py_data_unpack_fn)$outfn, $opnum, &ndr_table_$interface->{NAME} },");
|
||||
}
|
||||
$self->pidl("{ NULL }");
|
||||
$self->pidl("{0}");
|
||||
$self->deindent;
|
||||
$self->pidl("};");
|
||||
$self->pidl("");
|
||||
|
@ -389,7 +389,7 @@ static PyMethodDef py_misc_methods[] = {
|
||||
METH_VARARGS,
|
||||
"generate_random_bytes(len) -> bytes\n"
|
||||
"Generate random bytes with specified length." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -1654,7 +1654,7 @@ static PyTypeObject py_cli_state_type = {
|
||||
};
|
||||
|
||||
static PyMethodDef py_libsmb_methods[] = {
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
void initlibsmb_samba_internal(void);
|
||||
|
@ -64,7 +64,7 @@ static PyObject *py_get_context(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
static PyMethodDef pyparam_methods[] = {
|
||||
{ "get_context", (PyCFunction)py_get_context, METH_NOARGS,
|
||||
"Returns LoadParm context." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -3753,7 +3753,7 @@ static PyMethodDef py_pdb_methods[] = {
|
||||
{ "delete_secret", py_pdb_delete_secret, METH_VARARGS,
|
||||
"delete_secret(secret_name) -> None\n\n \
|
||||
Delete secret information for secret_name." },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
|
||||
@ -3969,7 +3969,7 @@ static PyMethodDef py_passdb_methods[] = {
|
||||
{ "reload_static_pdb", py_reload_static_pdb, METH_NOARGS,
|
||||
"reload_static_pdb() -> None\n\n \
|
||||
Re-initialise the static pdb used internally. Needed if 'passdb backend' is changed." },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -243,7 +243,7 @@ static PyMethodDef search_methods[] = {
|
||||
.ml_flags = METH_VARARGS|METH_KEYWORDS,
|
||||
.ml_doc = "",
|
||||
},
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *search_new(PyTypeObject *type,
|
||||
@ -448,7 +448,7 @@ static PyMethodDef conn_methods[] = {
|
||||
.ml_flags = METH_VARARGS|METH_KEYWORDS,
|
||||
.ml_doc = "mdscli.conn.disconnect(...) -> disconnect",
|
||||
},
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *conn_new(PyTypeObject *type,
|
||||
@ -521,7 +521,7 @@ static PyTypeObject conn_type = {
|
||||
};
|
||||
|
||||
static PyMethodDef mdscli_methods[] = {
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -456,5 +456,5 @@ struct cmd_set spotlight_commands[] = {
|
||||
.description = "Fetch attributes for a CNID",
|
||||
.usage = "",
|
||||
},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
@ -4640,7 +4640,7 @@ int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
|
||||
TALLOC_CTX *frame = talloc_stackframe();
|
||||
/* Initialise this to zero, in a portable way */
|
||||
struct smb_acl_wrapper acl_wrapper = {
|
||||
NULL
|
||||
0
|
||||
};
|
||||
struct smb_filename *smb_fname = cp_smb_filename_nostream(frame,
|
||||
smb_fname_in);
|
||||
|
@ -1164,7 +1164,7 @@ static PyMethodDef py_smbd_methods[] = {
|
||||
PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_create_file),
|
||||
METH_VARARGS|METH_KEYWORDS,
|
||||
NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
void initsmbd(void);
|
||||
|
@ -2058,5 +2058,5 @@ struct cmd_set vfs_commands[] = {
|
||||
{ "test_chain", cmd_test_chain, "test chain code",
|
||||
"test_chain" },
|
||||
{ "translate_name", cmd_translate_name, "VFS translate_name()", "translate_name unix_filename" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
@ -1689,7 +1689,7 @@ struct poptOption help_options[] = {
|
||||
NULL, NULL },
|
||||
{ "help", '?', 0, NULL, '?', "Show this help message", NULL },
|
||||
{ "usage", '\0', 0, NULL, 'u', "Display brief usage message", NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
} ;
|
||||
|
||||
/* Main program */
|
||||
|
@ -693,7 +693,7 @@ static PyMethodDef py_gensec_security_methods[] = {
|
||||
"S.sign_packet(data, whole_pdu) -> sig\nSign a DCERPC packet." },
|
||||
{ "check_packet", (PyCFunction)py_gensec_check_packet, METH_VARARGS,
|
||||
"S.check_packet(data, whole_pdu, sig)\nCheck a DCERPC packet." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -434,7 +434,7 @@ static PyMethodDef py_auth_methods[] = {
|
||||
PY_DISCARD_FUNC_SIG(PyCFunction,py_copy_session_info),
|
||||
METH_VARARGS|METH_KEYWORDS,
|
||||
NULL },
|
||||
{ NULL },
|
||||
{0},
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -622,7 +622,7 @@ int main(int argc, const char ** argv)
|
||||
POPT_COMMON_CONNECTION
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
/* Block sizes. */
|
||||
|
@ -544,7 +544,7 @@ static isc_result_t parse_options(struct dlz_bind9_data *state,
|
||||
struct poptOption long_options[] = {
|
||||
{ "url", 'H', POPT_ARG_STRING, &options->url, 0, "database URL", "URL" },
|
||||
{ "debug", 'd', POPT_ARG_STRING, &options->debug, 0, "debug level", "DEBUG" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
pc = poptGetContext("dlz_bind9", argc, argv, long_options,
|
||||
|
@ -336,7 +336,7 @@ static PyMethodDef py_dsdb_dns_methods[] = {
|
||||
METH_VARARGS, "Replace the DNS database entries for a LDB DN"},
|
||||
{ "extract", (PyCFunction)py_dsdb_dns_extract,
|
||||
METH_VARARGS, "Return the DNS database entry as a python structure from an Ldb.MessageElement of type dnsRecord"},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -1479,7 +1479,7 @@ static PyMethodDef py_dsdb_methods[] = {
|
||||
"_dsdb_allocate_rid(samdb)"
|
||||
" -> RID" },
|
||||
{ "_dsdb_load_udv_v2", (PyCFunction)py_dsdb_load_udv_v2, METH_VARARGS, NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -150,7 +150,7 @@ static int increment_req_vs_found(struct tdb_context *tdb,
|
||||
.dptr = (unsigned char *)k,
|
||||
.dsize = sizeof(k)
|
||||
};
|
||||
TDB_DATA data = {NULL};
|
||||
TDB_DATA data = {0};
|
||||
ssize_t n_req = ac->n_attrs;
|
||||
if (ac->is_null) {
|
||||
n_req = NULL_REQ_PSEUDO_N;
|
||||
|
@ -143,7 +143,7 @@ static PyMethodDef py_policy_methods[] = {
|
||||
"get_gplink_options(options) -> list" },
|
||||
{ "ads_to_dir_access_mask", (PyCFunction)py_ads_to_dir_access_mask, METH_VARARGS,
|
||||
"ads_to_dir_access_mask(access_mask) -> dir_mask" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -153,7 +153,7 @@ static PyMethodDef registry_methods[] = {
|
||||
"Apply the diff from the specified file" },
|
||||
{ "mount_hive", py_mount_hive, METH_VARARGS, "S.mount_hive(key, key_id, elements=None) -> None\n"
|
||||
"Mount the specified key at the specified path." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
PyTypeObject PyRegistry = {
|
||||
@ -240,7 +240,7 @@ static PyMethodDef hive_key_methods[] = {
|
||||
"Delete a value" },
|
||||
{ "set_value", py_hive_key_set_value, METH_VARARGS, "S.set_value(name, type, data) -> None\n"
|
||||
"Set a value" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyObject *hive_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) {
|
||||
@ -443,7 +443,7 @@ static PyMethodDef py_registry_methods[] = {
|
||||
METH_VARARGS|METH_KEYWORDS, "open_hive(location, session_info=None, credentials=None, loadparm_context=None) -> key" },
|
||||
{ "str_regtype", py_str_regtype, METH_VARARGS, "str_regtype(int) -> str" },
|
||||
{ "get_predef_name", py_get_predef_name, METH_VARARGS, "get_predef_name(hkey) -> str" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -82,7 +82,7 @@ int main(int argc, const char **argv)
|
||||
POPT_COMMON_SAMBA
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
TALLOC_CTX *ctx;
|
||||
void *callback_data;
|
||||
|
@ -41,7 +41,7 @@ int main(int argc, const char **argv)
|
||||
{"file", 'F', POPT_ARG_STRING, &file, 0, "file path", NULL },
|
||||
POPT_COMMON_SAMBA
|
||||
POPT_COMMON_CREDENTIALS
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
pc = poptGetContext(argv[0], argc, argv, long_options,0);
|
||||
|
@ -380,7 +380,7 @@ static struct {
|
||||
{"help", "?", "Help", cmd_help },
|
||||
{"exit", "quit", "Exit", cmd_exit },
|
||||
{"predef", "predefined", "Go to predefined key", cmd_predef },
|
||||
{NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static WERROR cmd_help(struct regshell_context *ctx,
|
||||
@ -570,7 +570,7 @@ int main(int argc, const char **argv)
|
||||
POPT_COMMON_SAMBA
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
pc = poptGetContext(argv[0], argc, argv, long_options,0);
|
||||
|
@ -120,7 +120,7 @@ int main(int argc, const char **argv)
|
||||
POPT_COMMON_SAMBA
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
pc = poptGetContext(argv[0], argc, argv, long_options,0);
|
||||
|
@ -150,7 +150,7 @@ static PyMethodDef py_dom_sid_extra_methods[] = {
|
||||
{ "split", (PyCFunction)py_dom_sid_split, METH_NOARGS,
|
||||
"S.split() -> (domain_sid, rid)\n"
|
||||
"Split a domain sid" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
@ -306,7 +306,7 @@ static PyMethodDef py_descriptor_extra_methods[] = {
|
||||
NULL },
|
||||
{ "as_sddl", (PyCFunction)py_descriptor_as_sddl, METH_VARARGS,
|
||||
NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static void py_descriptor_patch(PyTypeObject *type)
|
||||
@ -422,7 +422,7 @@ static PyMethodDef py_token_extra_methods[] = {
|
||||
NULL },
|
||||
{ "set_privilege", (PyCFunction)py_token_set_privilege, METH_VARARGS,
|
||||
NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
#define PY_TOKEN_PATCH py_token_patch
|
||||
@ -479,7 +479,7 @@ static PyMethodDef py_mod_security_extra_methods[] = {
|
||||
{ "random_sid", (PyCFunction)py_random_sid, METH_NOARGS, NULL },
|
||||
{ "privilege_id", (PyCFunction)py_privilege_id, METH_VARARGS, NULL },
|
||||
{ "privilege_name", (PyCFunction)py_privilege_name, METH_VARARGS, NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static void py_mod_security_patch(PyObject *m)
|
||||
|
@ -87,7 +87,7 @@ static PyObject *py_ntacl_print(PyObject *self, PyObject *args)
|
||||
static PyMethodDef py_ntacl_extra_methods[] = {
|
||||
{ "dump", (PyCFunction)py_ntacl_print, METH_NOARGS,
|
||||
NULL },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static void py_xattr_NTACL_patch(PyTypeObject *type)
|
||||
|
@ -116,7 +116,7 @@ static PyMethodDef py_posix_eadb_methods[] = {
|
||||
"Set the given attribute to the given value on the given file." },
|
||||
{ "is_xattr_supported", (PyCFunction)py_is_xattr_supported, METH_NOARGS,
|
||||
"Return true if xattr are supported on this system\n"},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -105,7 +105,7 @@ static PyMethodDef py_xattr_methods[] = {
|
||||
"Set the given attribute to the given value on the given file." },
|
||||
{ "is_xattr_supported", (PyCFunction)py_is_xattr_supported, METH_NOARGS,
|
||||
"Return true if xattr are supported on this system\n"},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -152,7 +152,7 @@ static PyMethodDef py_xattr_methods[] = {
|
||||
"Set the given attribute to the given value on the given file." },
|
||||
{ "is_xattr_supported", (PyCFunction)py_is_xattr_supported, METH_NOARGS,
|
||||
"Return true if xattr are supported on this system\n"},
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -446,7 +446,7 @@ static PyMethodDef py_lp_ctx_methods[] = {
|
||||
{ "state_path", py_state_path, METH_VARARGS,
|
||||
"S.state_path(name) -> string\n"
|
||||
"Returns a path in the Samba state directory." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static PyObject *py_lp_ctx_default_service(PyObject *self, void *closure)
|
||||
@ -605,7 +605,7 @@ static PyObject *py_lp_service_dump(PyObject *self, PyObject *args)
|
||||
static PyMethodDef py_lp_service_methods[] = {
|
||||
{ "dump", (PyCFunction)py_lp_service_dump, METH_VARARGS,
|
||||
"S.dump(default_service, show_defaults=False, file_name='', mode='w')" },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
PyTypeObject PyLoadparmService = {
|
||||
@ -650,7 +650,7 @@ static PyMethodDef pyparam_methods[] = {
|
||||
"Returns the compiled in BINDIR." },
|
||||
{ "sbin_dir", (PyCFunction)py_sbin_dir, METH_NOARGS,
|
||||
"Returns the compiled in SBINDIR." },
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
|
@ -3318,7 +3318,7 @@ int main(int argc, const char *argv[])
|
||||
POPT_COMMON_CONNECTION
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
TALLOC_CTX *mem_ctx = NULL;
|
||||
|
||||
|
@ -1331,9 +1331,6 @@ static bool torture_ldb_unpack_data_corrupt(struct torture_context *torture)
|
||||
|
||||
int i, j, current, expect_rcode, ret;
|
||||
const char *comment;
|
||||
const char *comment_fmt = "Expected unpack rcode for index %d "
|
||||
"(corrupt bytes index %d) "
|
||||
"to be %d but got %d";
|
||||
|
||||
/*
|
||||
* List of corruptible byte ranges. First 12 bytes are corruptible,
|
||||
@ -1358,9 +1355,15 @@ static bool torture_ldb_unpack_data_corrupt(struct torture_context *torture)
|
||||
|
||||
ret = ldb_unpack_data(ldb, &bin_copy, msg);
|
||||
|
||||
comment = talloc_asprintf(bin_copy.data, comment_fmt,
|
||||
current, i,
|
||||
expect_rcode, ret);
|
||||
comment = talloc_asprintf(
|
||||
bin_copy.data,
|
||||
"Expected unpack rcode for index %d "
|
||||
"(corrupt bytes index %d) "
|
||||
"to be %d but got %d",
|
||||
current,
|
||||
i,
|
||||
expect_rcode,
|
||||
ret);
|
||||
torture_assert_int_equal(torture, ret, expect_rcode,
|
||||
comment);
|
||||
|
||||
|
@ -578,7 +578,7 @@ int main(int argc, const char *argv[])
|
||||
POPT_COMMON_CONNECTION
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
TALLOC_CTX *mem_ctx = NULL;
|
||||
int ret = -1;
|
||||
|
@ -317,7 +317,7 @@ int main(int argc, const char *argv[])
|
||||
POPT_COMMON_CONNECTION
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
setlinebuf(stdout);
|
||||
|
@ -426,7 +426,7 @@ int main(int argc, const char *argv[])
|
||||
POPT_COMMON_CONNECTION
|
||||
POPT_COMMON_CREDENTIALS
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
setlinebuf(stdout);
|
||||
|
@ -6898,7 +6898,7 @@ static bool test_empty_stream(struct torture_context *tctx,
|
||||
tcase_afpresource_rw,
|
||||
tcase_foo_ro,
|
||||
tcase_foo_rw,
|
||||
{NULL}
|
||||
{0}
|
||||
};
|
||||
|
||||
ret = torture_smb2_connection(tctx, &tree2);
|
||||
|
@ -49,7 +49,7 @@ static struct poptOption popt_options[] = {
|
||||
{ "output", 'O', POPT_ARG_STRING, &options.output, 0,
|
||||
"outputfile otherwise STDOUT", "outputfile"},
|
||||
POPT_COMMON_VERSION
|
||||
{ NULL }
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user