From 7f97c6b96c5f7589a2d66b82bd6c6de1f0170e5a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 Nov 2007 18:01:00 -0800 Subject: Remove unneeded variable. Jeremy. (This used to be commit c21bc756e36581d3adc770bc2b773b5cf9bf11d0) --- source3/lib/util.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source3/lib/util.c b/source3/lib/util.c index 287d2090ff..ab33df47ee 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1209,13 +1209,12 @@ bool get_myname(char *my_name) } /**************************************************************************** - Get my own domain name. + Get my own domain name, or "" if we have none. ****************************************************************************/ char *get_mydnsdomname(TALLOC_CTX *ctx) { const char *domname; - char *my_domname = NULL; char *p; domname = get_mydnsfullname(); @@ -1226,12 +1225,10 @@ char *get_mydnsdomname(TALLOC_CTX *ctx) p = strchr_m(domname, '.'); if (p) { p++; - my_domname = talloc_strdup(ctx, p); + return talloc_strdup(ctx, p); } else { - my_domname = talloc_strdup(ctx, ""); + return talloc_strdup(ctx, ""); } - - return my_domname; } /**************************************************************************** -- cgit