diff options
Diffstat (limited to 'libparsepcf_parse_int16_from_unsigned__.c')
-rw-r--r-- | libparsepcf_parse_int16_from_unsigned__.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libparsepcf_parse_int16_from_unsigned__.c b/libparsepcf_parse_int16_from_unsigned__.c index 3d61ef8..d4c0167 100644 --- a/libparsepcf_parse_int16_from_unsigned__.c +++ b/libparsepcf_parse_int16_from_unsigned__.c @@ -5,9 +5,8 @@ int16_t libparsepcf_parse_int16_from_unsigned__(uint16_t u) { - if (u & UINT16_C(0x8000)) { + if (u & UINT16_C(0x8000)) return (int16_t)(uint16_t)~u - 1; - } else { + else return (int16_t)u; - } } |