x86, tracehook: clean up implementation of syscall_get_error()