From 07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 31 Dec 2008 18:06:57 -0800 Subject: Fix all warnings in source3 with gcc4.3. Jeremy. --- source3/utils/net_rpc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/utils/net_rpc.c') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 5c83b590c1..e0d606c19a 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -749,7 +749,9 @@ static int rpc_user_password(struct net_context *c, int argc, const char **argv) if (argv[1]) { u1003.usri1003_password = argv[1]; } else { - asprintf(&prompt, "Enter new password for %s:", argv[0]); + if (asprintf(&prompt, "Enter new password for %s:", argv[0]) == -1) { + return -1; + } u1003.usri1003_password = getpass(prompt); SAFE_FREE(prompt); } @@ -5533,7 +5535,9 @@ static int rpc_trustdom_establish(struct net_context *c, int argc, strupper_m(domain_name); /* account name used at first is our domain's name with '$' */ - asprintf(&acct_name, "%s$", lp_workgroup()); + if (asprintf(&acct_name, "%s$", lp_workgroup()) == -1) { + return -1; + } strupper_m(acct_name); /* -- cgit