aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pack.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/pack.c b/pack.c
index 4a8228a..5a603e0 100644
--- a/pack.c
+++ b/pack.c
@@ -59,13 +59,7 @@ enum pack_status pack(void *buf_, size_t size, const char *fmt, ...)
if (sign) {
intmax_t n = v.signed_;
tr_debug("val.s: %" PRIdMAX, v.signed_);
- if (v.signed_ >= 0) {
- v.unsigned_ = n;
- } else {
- uintmax_t offt = BITMASK(s * 8);
- n += 1;
- v.unsigned_ = offt + n;
- }
+ v.unsigned_ = n;
}
tr_debug("val.u: %" PRIuMAX, v.unsigned_);
write_val(&buf[offset], s, endianness, v.unsigned_);