From dfbf6201297a39f339a179fbc8444b3748bf5012 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Jun 2004 08:31:47 +0000 Subject: r975: slight improvemet to nt_errstr(), still needs to be fixed properly (getting rid of the static buffer) (This used to be commit 86a6236c2ad14fe94f5d7c488bfdbfb329d2a0bb) --- source4/libcli/util/nterr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli') 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; } -- cgit