diff options
author | Jeremy Allison <jra@samba.org> | 2008-12-31 18:06:57 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-12-31 18:06:57 -0800 |
commit | 07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00 (patch) | |
tree | 412f448d68b4b0f36c5b330a1f3eef77acf12a2f /source3/utils/net_lookup.c | |
parent | bb23f5725f538d14b2ccec0463cfb1136be3ebd0 (diff) | |
download | samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.gz |
Fix all warnings in source3 with gcc4.3.
Jeremy.
Diffstat (limited to 'source3/utils/net_lookup.c')
-rw-r--r-- | source3/utils/net_lookup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index 8b9ddb62ba..66f673b8d3 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -196,7 +196,9 @@ static int net_lookup_dc(struct net_context *c, int argc, const char **argv) return -1; print_sockaddr(addr, sizeof(addr), &ss); - asprintf(&pdc_str, "%s", addr); + if (asprintf(&pdc_str, "%s", addr) == -1) { + return -1; + } d_printf("%s\n", pdc_str); sitename = sitename_fetch(domain); @@ -237,7 +239,9 @@ static int net_lookup_pdc(struct net_context *c, int argc, const char **argv) return -1; print_sockaddr(addr, sizeof(addr), &ss); - asprintf(&pdc_str, "%s", addr); + if (asprintf(&pdc_str, "%s", addr) == -1) { + return -1; + } d_printf("%s\n", pdc_str); SAFE_FREE(pdc_str); return 0; |