aboutsummaryrefslogtreecommitdiffstats
path: root/libparsepcf_parse_int32_from_unsigned__.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-07-02 11:24:35 +0200
committerMattias Andrée <maandree@kth.se>2023-07-02 11:24:35 +0200
commite6ffdd93965a0cd0d10f7b7e302e2947e9b46dd7 (patch)
tree85516a0e527e26bf2c0516facab5c377ccb10ceb /libparsepcf_parse_int32_from_unsigned__.c
parentAdd coverage test (requires `make check` which has not been implemented yet) (diff)
downloadlibparsepcf-e6ffdd93965a0cd0d10f7b7e302e2947e9b46dd7.tar.gz
libparsepcf-e6ffdd93965a0cd0d10f7b7e302e2947e9b46dd7.tar.bz2
libparsepcf-e6ffdd93965a0cd0d10f7b7e302e2947e9b46dd7.tar.xz
m + add some documentation
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libparsepcf_parse_int32_from_unsigned__.c5
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;
- }
}