aboutsummaryrefslogtreecommitdiff
path: root/value.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-05-04 13:09:35 +0200
committerPetr Machata <pmachata@redhat.com>2012-08-29 19:03:16 +0200
commit5062d310aeba0103b48cd7b71d629c31dbdb89e8 (patch)
tree4fddcbdd24894206956c5b1a0aa4c3825988d9ef /value.c
parent4c2109ab8912d6c6616702ec9fa0cbaf65e7f751 (diff)
downloadltrace-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/value.c b/value.c
index 8e4333b..bb34f64 100644
--- a/value.c
+++ b/value.c
@@ -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);