diff options
Diffstat (limited to 'source4/libcli/util')
-rw-r--r-- | source4/libcli/util/doserr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/libcli/util/doserr.c b/source4/libcli/util/doserr.c index c4ec869961..b8605864fc 100644 --- a/source4/libcli/util/doserr.c +++ b/source4/libcli/util/doserr.c @@ -22,13 +22,12 @@ #include "includes.h" -typedef const struct -{ +struct werror_code_struct { const char *dos_errstr; WERROR werror; -} werror_code_struct; +}; -werror_code_struct dos_errs[] = +static const struct werror_code_struct dos_errs[] = { { "WERR_OK", WERR_OK }, { "WERR_BADFILE", WERR_BADFILE }, @@ -79,8 +78,6 @@ const char *win_errstr(WERROR werror) static pstring msg; 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)) @@ -88,5 +85,7 @@ const char *win_errstr(WERROR werror) idx++; } + slprintf(msg, sizeof(msg), "DOS code 0x%08x", W_ERROR_V(werror)); + return msg; } |