diff options
author | Günther Deschner <gd@samba.org> | 2011-01-28 23:38:21 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-08 08:58:11 +0100 |
commit | 724c9821313b5289dc6fa29bbe930c19dfd230fb (patch) | |
tree | 43abbc984904fa5be73ebced43c0ffcd1dcadc35 /source4/libcli/util | |
parent | e68f6adca9494166bf7c24c358ea1af718970b0d (diff) | |
download | samba-724c9821313b5289dc6fa29bbe930c19dfd230fb.tar.gz samba-724c9821313b5289dc6fa29bbe930c19dfd230fb.tar.bz2 samba-724c9821313b5289dc6fa29bbe930c19dfd230fb.zip |
ndr: merge duplicate ndr_map_error2ntstatus() functions.
Guenther
Diffstat (limited to 'source4/libcli/util')
-rw-r--r-- | source4/libcli/util/errormap.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c index 29f2331cde..a0154e370b 100644 --- a/source4/libcli/util/errormap.c +++ b/source4/libcli/util/errormap.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "librpc/ndr/libndr.h" /* This map was extracted by the ERRMAPEXTRACT smbtorture command. The setup was a Samba HEAD (2002-01-03) PDC and an Win2k member @@ -1388,28 +1387,3 @@ WERROR unix_to_werror(int unix_error) { return ntstatus_to_werror(map_nt_error_from_unix(unix_error)); } - -NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err) -{ - switch (ndr_err) { - case NDR_ERR_SUCCESS: - return NT_STATUS_OK; - case NDR_ERR_BUFSIZE: - return NT_STATUS_BUFFER_TOO_SMALL; - case NDR_ERR_TOKEN: - return NT_STATUS_INTERNAL_ERROR; - case NDR_ERR_ALLOC: - return NT_STATUS_NO_MEMORY; - case NDR_ERR_ARRAY_SIZE: - return NT_STATUS_ARRAY_BOUNDS_EXCEEDED; - case NDR_ERR_INVALID_POINTER: - return NT_STATUS_INVALID_PARAMETER_MIX; - case NDR_ERR_UNREAD_BYTES: - return NT_STATUS_PORT_MESSAGE_TOO_LONG; - default: - break; - } - - /* we should map all error codes to different status codes */ - return NT_STATUS_INVALID_PARAMETER; -} |