From 4c857010e7113d99028cf8d7fac5e5b95c400fb3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 19 Apr 2008 22:05:13 +0200 Subject: Fix two "ignoring asprintf result" warnings (This used to be commit 1d261e78b38e8080ca7122037d33c8ef913a4558) --- source3/libads/ldap_printer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index e2396ce4cf..440f979781 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -288,9 +288,8 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, uint32 i; POLICY_HND pol; - asprintf(&servername, "\\\\%s", cli->desthost); - asprintf(&printername, "%s\\%s", servername, printer); - if (!servername || !printername) { + if ((asprintf(&servername, "\\\\%s", cli->desthost) == -1) + || (asprintf(&printername, "%s\\%s", servername, printer) == -1)) { DEBUG(3, ("Insufficient memory\n")); return WERR_NOMEM; } -- cgit