git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a21885
)
Fix two "ignoring asprintf result" warnings
author
Volker Lendecke
<vl@samba.org>
Sat, 19 Apr 2008 20:05:13 +0000
(22:05 +0200)
committer
Volker Lendecke
<vl@samba.org>
Sat, 19 Apr 2008 22:13:39 +0000
(
00:13
+0200)
(This used to be commit
1d261e78b38e8080ca7122037d33c8ef913a4558
)
source3/libads/ldap_printer.c
patch
|
blob
|
history
diff --git
a/source3/libads/ldap_printer.c
b/source3/libads/ldap_printer.c
index e2396ce4cf83c51937d78094725ccdaebb38abb7..440f979781ecd5b04c257371f1b38308da510803 100644
(file)
--- 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;
}