The branch, master has been updated via 5dfbb0d24dc s3:lib: Move up NULL check via de926429413 s3:utils: Only declare variables if we're gonna use them via 5cce3493fb6 lib:mscat: Add missing return check for error in dumpsmcat via 39c15ab2b7a ctdb:tests: Add missing va_end() in ctdb_set_error() from 1958cd8a7fb ldap server: generate correct referral schemes
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 5dfbb0d24dc572e18906cc4acfd95ab43a8567aa Author: Andreas Schneider <a...@samba.org> Date: Mon May 20 16:21:00 2019 +0200 s3:lib: Move up NULL check Found by covscan. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Gary Lockyer <g...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Fri May 24 07:23:42 UTC 2019 on sn-devel-184 commit de926429413f2440d185681586427a9e77c81a7f Author: Andreas Schneider <a...@samba.org> Date: Mon May 20 16:07:08 2019 +0200 s3:utils: Only declare variables if we're gonna use them Found by covscan. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Gary Lockyer <g...@samba.org> commit 5cce3493fb6696c01ccacf165cfcd45c588fc279 Author: Andreas Schneider <a...@samba.org> Date: Mon May 20 15:57:45 2019 +0200 lib:mscat: Add missing return check for error in dumpsmcat Found by csbuild. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Gary Lockyer <g...@samba.org> commit 39c15ab2b7a38eb2871419336b08863fd20d5143 Author: Andreas Schneider <a...@samba.org> Date: Mon May 20 15:52:12 2019 +0200 ctdb:tests: Add missing va_end() in ctdb_set_error() Found by csbuild. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Gary Lockyer <g...@samba.org> ----------------------------------------------------------------------- Summary of changes: ctdb/tests/src/ctdb_io_test.c | 1 + lib/mscat/dumpmscat.c | 15 ++++++++++++--- source3/lib/popt_common_cmdline.c | 8 ++++---- source3/utils/smbcontrol.c | 2 ++ 4 files changed, 19 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/src/ctdb_io_test.c b/ctdb/tests/src/ctdb_io_test.c index 9cd02aa0eaa..e3cb0a98ffe 100644 --- a/ctdb/tests/src/ctdb_io_test.c +++ b/ctdb/tests/src/ctdb_io_test.c @@ -29,6 +29,7 @@ void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...) va_list ap; va_start(ap, fmt); vprintf(fmt, ap); + va_end(ap); assert(false); } diff --git a/lib/mscat/dumpmscat.c b/lib/mscat/dumpmscat.c index eac2184e7ad..5364610d483 100644 --- a/lib/mscat/dumpmscat.c +++ b/lib/mscat/dumpmscat.c @@ -103,11 +103,16 @@ int main(int argc, char *argv[]) { } rc = mscat_ctl_import(msctl, cat_pkcs7); - if (rc != 0) { + if (rc < 0) { + exit(1); + } + + rc = mscat_ctl_get_member_count(msctl); + if (rc < 0) { exit(1); } - member_count = mscat_ctl_get_member_count(msctl); + member_count = rc; printf("CATALOG MEMBER COUNT=%d\n", member_count); for (i = 0; i < member_count; i++) { @@ -164,7 +169,11 @@ int main(int argc, char *argv[]) { } printf("\n"); - attribute_count = mscat_ctl_get_attribute_count(msctl); + rc = mscat_ctl_get_attribute_count(msctl); + if (rc < 0) { + exit(1); + } + attribute_count = rc; printf("CATALOG ATTRIBUTE COUNT=%d\n", attribute_count); for (i = 0; i < attribute_count; i++) { diff --git a/source3/lib/popt_common_cmdline.c b/source3/lib/popt_common_cmdline.c index 95abec1a440..79e34847f48 100644 --- a/source3/lib/popt_common_cmdline.c +++ b/source3/lib/popt_common_cmdline.c @@ -198,6 +198,10 @@ void popt_burn_cmdline_password(int argc, char *argv[]) for (i = 0; i < argc; i++) { p = argv[i]; + if (p == NULL) { + return; + } + if (strncmp(p, "-U", 2) == 0) { ulen = 2; found = true; @@ -207,10 +211,6 @@ void popt_burn_cmdline_password(int argc, char *argv[]) } if (found) { - if (p == NULL) { - return; - } - if (strlen(p) == ulen) { continue; } diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 1a2a0ec3ed5..7a761a6ff59 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -415,9 +415,11 @@ static bool do_sleep(struct tevent_context *ev_ctx, const struct server_id pid, const int argc, const char **argv) { +#if defined(DEVELOPER) && defined(ENABLE_SELFTEST) unsigned int seconds; long input; const long MAX_SLEEP = 60 * 60; /* One hour maximum sleep */ +#endif if (argc != 2) { fprintf(stderr, "Usage: smbcontrol <dest> sleep seconds\n"); -- Samba Shared Repository