summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-11-07 18:47:32 +0100
committerStefan Metzmacher <metze@samba.org>2007-11-09 15:11:27 +0100
commit9e5ef9a87424ce02d114c702c238fcd14a92de01 (patch)
treeaa237b1aaadccb373bf8b8fe8cc9e76cacb8f2aa
parent95b9e23095a51615bc51abb55adcd6330b57b66e (diff)
downloadsamba-9e5ef9a87424ce02d114c702c238fcd14a92de01.tar.gz
samba-9e5ef9a87424ce02d114c702c238fcd14a92de01.tar.bz2
samba-9e5ef9a87424ce02d114c702c238fcd14a92de01.zip
pstring removal
(This used to be commit 0ee896827215a24e70a4ac6bde5ded13f9497296)
-rw-r--r--source3/libsmb/doserr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/libsmb/doserr.c b/source3/libsmb/doserr.c
index b8cb8b4bc6..478b87d730 100644
--- a/source3/libsmb/doserr.c
+++ b/source3/libsmb/doserr.c
@@ -94,11 +94,9 @@ werror_code_struct dos_errs[] =
const char *dos_errstr(WERROR werror)
{
- static pstring msg;
+ char *result;
int idx = 0;
- slprintf(msg, sizeof(msg), "DOS code 0x%08x", W_ERROR_V(werror));
-
while (dos_errs[idx].dos_errstr != NULL) {
if (W_ERROR_V(dos_errs[idx].werror) ==
W_ERROR_V(werror))
@@ -106,7 +104,10 @@ const char *dos_errstr(WERROR werror)
idx++;
}
- return msg;
+ result = talloc_asprintf(talloc_tos(), "DOS code 0x%08x",
+ W_ERROR_V(werror));
+ SMB_ASSERT(result != NULL);
+ return result;
}
/* compat function for samba4 */