]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "Fix two "ignoring asprintf result" warnings"
authorVolker Lendecke <vl@samba.org>
Fri, 25 Apr 2008 14:34:59 +0000 (16:34 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 25 Apr 2008 14:34:59 +0000 (16:34 +0200)
This reverts commit 1d261e78b38e8080ca7122037d33c8ef913a4558.

source/libads/ldap_printer.c

index 440f979781ecd5b04c257371f1b38308da510803..e2396ce4cf83c51937d78094725ccdaebb38abb7 100644 (file)
@@ -288,8 +288,9 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
        uint32 i;
        POLICY_HND pol;
 
-       if ((asprintf(&servername, "\\\\%s", cli->desthost) == -1)
-           || (asprintf(&printername, "%s\\%s", servername, printer) == -1)) {
+       asprintf(&servername, "\\\\%s", cli->desthost);
+       asprintf(&printername, "%s\\%s", servername, printer);
+       if (!servername || !printername) {
                DEBUG(3, ("Insufficient memory\n"));
                return WERR_NOMEM;
        }