diff options
author | Petr Machata <pmachata@redhat.com> | 2012-05-04 13:09:35 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-08-29 19:03:16 +0200 |
commit | 5062d310aeba0103b48cd7b71d629c31dbdb89e8 (patch) | |
tree | 4fddcbdd24894206956c5b1a0aa4c3825988d9ef /value.c | |
parent | 4c2109ab8912d6c6616702ec9fa0cbaf65e7f751 (diff) | |
download | ltrace-5062d310aeba0103b48cd7b71d629c31dbdb89e8.tar.gz |
Set value by hand in value_reserve
Because value_set_word needs a type set, to resolve (potential) endian
issues. But we don't need this when all we do is set something to zero.
Diffstat (limited to 'value.c')
-rw-r--r-- | value.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -99,7 +99,8 @@ unsigned char * value_reserve(struct value *valp, size_t size) { if (size <= sizeof(valp->u.value)) { - value_set_word(valp, 0); + valp->where = VAL_LOC_WORD; + valp->u.value = 0; } else { valp->where = VAL_LOC_COPY; valp->u.address = calloc(size, 1); |