diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-06-02 08:31:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:24 -0500 |
commit | dfbf6201297a39f339a179fbc8444b3748bf5012 (patch) | |
tree | 45955d8cf31cb4e3b4b56c162fdc1857a4ec11fc /source4 | |
parent | de827cb9d9173ef09a37b45d6c7d30af9fe5c96e (diff) | |
download | samba-dfbf6201297a39f339a179fbc8444b3748bf5012.tar.gz samba-dfbf6201297a39f339a179fbc8444b3748bf5012.tar.bz2 samba-dfbf6201297a39f339a179fbc8444b3748bf5012.zip |
r975: slight improvemet to nt_errstr(), still needs to be fixed properly
(getting rid of the static buffer)
(This used to be commit 86a6236c2ad14fe94f5d7c488bfdbfb329d2a0bb)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/util/nterr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/util/nterr.c b/source4/libcli/util/nterr.c index 6c4b7c8417..c71dc2247b 100644 --- a/source4/libcli/util/nterr.c +++ b/source4/libcli/util/nterr.c @@ -646,8 +646,6 @@ const char *nt_errstr(NTSTATUS nt_code) static pstring msg; int idx = 0; - slprintf(msg, sizeof(msg), "NT code 0x%08x", NT_STATUS_V(nt_code)); - while (nt_errs[idx].nt_errstr != NULL) { if (NT_STATUS_V(nt_errs[idx].nt_errcode) == NT_STATUS_V(nt_code)) { @@ -656,6 +654,8 @@ const char *nt_errstr(NTSTATUS nt_code) idx++; } + slprintf(msg, sizeof(msg), "NT code 0x%08x", NT_STATUS_V(nt_code)); + return msg; } |