From 2392a36370afdcf36e19baf0f19689e733599097 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 12 Apr 2004 23:15:11 +0000 Subject: [PATCH] Get rid of non-standard ERROR_UNKNOWN value. --- dlls/icmp/icmp_main.c | 4 ++-- include/winerror.h | 7 ------- server/file.c | 2 +- server/sock.c | 2 +- server/trace.c | 1 - 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/dlls/icmp/icmp_main.c b/dlls/icmp/icmp_main.c index 51c134c6bc5..4971a7ced77 100644 --- a/dlls/icmp/icmp_main.c +++ b/dlls/icmp/icmp_main.c @@ -325,11 +325,11 @@ DWORD WINAPI IcmpSendEcho( SetLastError(IP_DEST_NET_UNREACHABLE); break; case EHOSTUNREACH: - SetLastError(IP_DEST_NET_UNREACHABLE); + SetLastError(IP_DEST_HOST_UNREACHABLE); break; default: TRACE("unknown error: errno=%d\n",errno); - SetLastError(ERROR_UNKNOWN); + SetLastError(IP_GENERAL_FAILURE); } } return 0; diff --git a/include/winerror.h b/include/winerror.h index 771672d18b0..164f54f0e1c 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -62,13 +62,6 @@ /* This macros is obsolete and should not be used in new apps. */ #define ResultFromScode(sc) ((HRESULT)(sc)) -/* ERROR_UNKNOWN is a placeholder for error conditions which haven't - * been tested yet so we're not exactly sure what will be returned. - * All instances of ERROR_UNKNOWN should be tested under Win95/NT - * and replaced. - */ -#define ERROR_UNKNOWN 99999 - #define NO_ERROR 0 #define ERROR_SUCCESS 0 #define ERROR_INVALID_FUNCTION 1 diff --git a/server/file.c b/server/file.c index 7c90f951496..509a7c0321e 100644 --- a/server/file.c +++ b/server/file.c @@ -373,7 +373,7 @@ void file_set_error(void) #ifdef EOVERFLOW case EOVERFLOW: set_error( STATUS_INVALID_PARAMETER ); break; #endif - default: perror("file_set_error"); set_win32_error( ERROR_UNKNOWN ); break; + default: perror("file_set_error"); set_error( STATUS_UNSUCCESSFUL ); break; } } diff --git a/server/sock.c b/server/sock.c index e18085006ff..2b1a1267f89 100644 --- a/server/sock.c +++ b/server/sock.c @@ -755,7 +755,7 @@ static int sock_get_error( int err ) #ifdef EREMOTE case EREMOTE: return WSAEREMOTE; break; #endif - default: errno=err; perror("sock_set_error"); return ERROR_UNKNOWN; break; + default: errno=err; perror("sock_set_error"); return WSAEFAULT; break; } } diff --git a/server/trace.c b/server/trace.c index b46cc1d8a47..81afe590a17 100644 --- a/server/trace.c +++ b/server/trace.c @@ -3117,7 +3117,6 @@ static const char *get_status_name( unsigned int status ) NAME_WIN32(ERROR_INVALID_INDEX), NAME_WIN32(ERROR_NEGATIVE_SEEK), NAME_WIN32(ERROR_SEEK), - NAME_WIN32(ERROR_UNKNOWN), { NULL, 0 } /* terminator */ }; #undef NAME