Re: [PATCH 4/6]: msvcp110: Add tr2_sys__Stat implementation and test.(try 2)
On 07/03/15 05:59, YongHaoHu wrote:
+static file_type stat_set_error(int *err_code) +{ + file_type ret; + + switch(GetLastError()) { + case ERROR_FILE_NOT_FOUND: + case ERROR_BAD_NETPATH: + case ERROR_INVALID_NAME: + case ERROR_BAD_PATHNAME: + case ERROR_PATH_NOT_FOUND: + ret = file_not_found; + *err_code = ERROR_SUCCESS; + break; + case ERROR_SUCCESS: + ret = regular_file; + *err_code = ERROR_SUCCESS; + break; Why are you handling ERROR_SUCCESS here? stat_set_error function is only called in case of error.
Are you planning to reuse this function somewhere else? If not it might be part of tr2_sys__Stat function. Thanks, Piotr
participants (1)
-
Piotr Caban