From 5c6f96144706ceb4f7fd3a5515dcebf78b21c908 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 24 Nov 2007 16:32:38 +0100 Subject: Remove a static (This used to be commit 85a84f72ffc440fb71744cb72de2dba07793123c) --- source3/utils/net_usershare.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c index 658c0089da..19fa8fad2f 100644 --- a/source3/utils/net_usershare.c +++ b/source3/utils/net_usershare.c @@ -41,7 +41,7 @@ struct { static const char *get_us_error_code(enum usershare_err us_err) { - static pstring out; + char *result; int idx = 0; while (us_errs[idx].us_errstr != NULL) { @@ -51,8 +51,10 @@ static const char *get_us_error_code(enum usershare_err us_err) idx++; } - slprintf(out, sizeof(out), "Usershare error code (0x%x)", (unsigned int)us_err); - return out; + result = talloc_asprintf(talloc_tos(), "Usershare error code (0x%x)", + (unsigned int)us_err); + SMB_ASSERT(result != NULL); + return result; } /* The help subsystem for the USERSHARE subcommand */ -- cgit