Revision 95b33b2f linux-user/syscall.c

b/linux-user/syscall.c
934 934

  
935 935
static inline rlim_t target_to_host_rlim(target_ulong target_rlim)
936 936
{
937
    if (target_rlim == TARGET_RLIM_INFINITY)
938
        return RLIM_INFINITY;
937
    target_ulong target_rlim_swap;
938
    rlim_t result;
939
    
940
    target_rlim_swap = tswapl(target_rlim);
941
    if (target_rlim_swap == TARGET_RLIM_INFINITY || target_rlim_swap != (rlim_t)target_rlim_swap)
942
        result = RLIM_INFINITY;
939 943
    else
940
        return tswapl(target_rlim);
944
        result = target_rlim_swap;
945
    
946
    return result;
941 947
}
942 948

  
943 949
static inline target_ulong host_to_target_rlim(rlim_t rlim)
944 950
{
951
    target_ulong target_rlim_swap;
952
    target_ulong result;
953
    
945 954
    if (rlim == RLIM_INFINITY || rlim != (target_long)rlim)
946
        return TARGET_RLIM_INFINITY;
955
        target_rlim_swap = TARGET_RLIM_INFINITY;
947 956
    else
948
        return tswapl(rlim);
957
        target_rlim_swap = rlim;
958
    result = tswapl(target_rlim_swap);
959
    
960
    return result;
949 961
}
950 962

  
951 963
static inline abi_long copy_from_user_timeval(struct timeval *tv,

Also available in: Unified diff