diff options
Diffstat (limited to 'libparsepcf_parse_int32_from_unsigned__.c')
-rw-r--r-- | libparsepcf_parse_int32_from_unsigned__.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libparsepcf_parse_int32_from_unsigned__.c b/libparsepcf_parse_int32_from_unsigned__.c index 37de799..b446004 100644 --- a/libparsepcf_parse_int32_from_unsigned__.c +++ b/libparsepcf_parse_int32_from_unsigned__.c @@ -5,9 +5,8 @@ int32_t libparsepcf_parse_int32_from_unsigned__(uint32_t u) { - if (u & UINT32_C(0x80000000)) { + if (u & UINT32_C(0x80000000)) return (int32_t)(uint32_t)~u - 1; - } else { + else return (int32_t)u; - } } |