summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-08 18:01:00 -0800
committerJeremy Allison <jra@samba.org>2007-11-08 18:01:00 -0800
commit7f97c6b96c5f7589a2d66b82bd6c6de1f0170e5a (patch)
tree0250bccd3682b917b514eb084b700ecabad3991d /source3
parent214bb0f11937843a268a897ab0337184ab36c2bc (diff)
downloadsamba-7f97c6b96c5f7589a2d66b82bd6c6de1f0170e5a.tar.gz
samba-7f97c6b96c5f7589a2d66b82bd6c6de1f0170e5a.tar.bz2
samba-7f97c6b96c5f7589a2d66b82bd6c6de1f0170e5a.zip
Remove unneeded variable.
Jeremy. (This used to be commit c21bc756e36581d3adc770bc2b773b5cf9bf11d0)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util.c9
1 files 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;
}
/****************************************************************************