mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r975: slight improvemet to nt_errstr(), still needs to be fixed properly
(getting rid of the static buffer)
(This used to be commit 86a6236c2a
)
This commit is contained in:
parent
de827cb9d9
commit
dfbf620129
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user