Get rid of non-standard ERROR_UNKNOWN value.

This commit is contained in:
Filip Navara 2004-04-12 23:15:11 +00:00 committed by Alexandre Julliard
parent 3462299c55
commit 2392a36370
5 changed files with 4 additions and 12 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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