summaryrefslogtreecommitdiffstats
path: root/source/libsmb/nterr.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-10-05 21:28:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:31:12 -0500
commit0f2552e20fb66b0b80006a8a7b999ccf6f54c656 (patch)
tree69cbb46326bf02977e102541b55c9358862d20b4 /source/libsmb/nterr.c
parente0927a7cbf4b806bcc93ad4af9552bc91292e78b (diff)
downloadsamba-0f2552e20fb66b0b80006a8a7b999ccf6f54c656.tar.gz
samba-0f2552e20fb66b0b80006a8a7b999ccf6f54c656.tar.xz
samba-0f2552e20fb66b0b80006a8a7b999ccf6f54c656.zip
r25533: remove a pstring
Diffstat (limited to 'source/libsmb/nterr.c')
-rw-r--r--source/libsmb/nterr.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/source/libsmb/nterr.c b/source/libsmb/nterr.c
index d88e650c9cb..774e50e700b 100644
--- a/source/libsmb/nterr.c
+++ b/source/libsmb/nterr.c
@@ -647,7 +647,6 @@ nt_err_code_struct nt_err_desc[] =
const char *nt_errstr(NTSTATUS nt_code)
{
- static pstring msg;
int idx = 0;
#ifdef HAVE_LDAP
@@ -656,8 +655,6 @@ const char *nt_errstr(NTSTATUS nt_code)
}
#endif
- slprintf(msg, sizeof(msg), "NT code 0x%08x", NT_STATUS_V(nt_code));
-
while (nt_errs[idx].nt_errstr != NULL) {
if (NT_STATUS_EQUAL(nt_errs[idx].nt_errcode, nt_code)) {
return nt_errs[idx].nt_errstr;
@@ -665,7 +662,8 @@ const char *nt_errstr(NTSTATUS nt_code)
idx++;
}
- return msg;
+ return talloc_asprintf(talloc_tos(), "NT code 0x%08x",
+ NT_STATUS_V(nt_code));
}
/************************************************************************
@@ -689,28 +687,6 @@ const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
}
/*****************************************************************************
- Returns an NT_STATUS constant as a string for inclusion in autogen C code.
- *****************************************************************************/
-
-const char *get_nt_error_c_code(NTSTATUS nt_code)
-{
- static pstring out;
- int idx = 0;
-
- while (nt_errs[idx].nt_errstr != NULL) {
- if (NT_STATUS_V(nt_errs[idx].nt_errcode) ==
- NT_STATUS_V(nt_code)) {
- return nt_errs[idx].nt_errstr;
- }
- idx++;
- }
-
- slprintf(out, sizeof(out), "NT_STATUS(0x%08x)", NT_STATUS_V(nt_code));
-
- return out;
-}
-
-/*****************************************************************************
Returns the NT_STATUS constant matching the string supplied (as an NTSTATUS)
*****************************************************************************/