aboutsummaryrefslogtreecommitdiff
path: root/output.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-05-29 17:59:48 +0200
committerPetr Machata <pmachata@redhat.com>2012-08-29 19:03:17 +0200
commita6fb1f5c52bb6c5f460bfb1631162ecf31c96621 (patch)
tree373eac735aaf0bc637bcf943d85cfb62419814be /output.c
parente75fc3bfb167fb56c82a3af706b64335412639a8 (diff)
downloadltrace-a6fb1f5c52bb6c5f460bfb1631162ecf31c96621.tar.gz
Don't attempt to display return value if fetch_retval fails
Diffstat (limited to 'output.c')
-rw-r--r--output.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/output.c b/output.c
index 7163275..b138055 100644
--- a/output.c
+++ b/output.c
@@ -546,12 +546,12 @@ output_right(enum tof type, struct Process *proc, struct library_symbol *libsym)
value_init(&retval, proc, NULL, func->return_info, 0);
own_retval = 1;
if (fetch_retval(context, type, proc, func->return_info,
- &retval) == 0) {
- if (stel->arguments != NULL
- && val_dict_push_named(stel->arguments, &retval,
- "retval", 0) == 0)
- own_retval = 0;
- }
+ &retval) < 0)
+ value_set_type(&retval, NULL, 0);
+ else if (stel->arguments != NULL
+ && val_dict_push_named(stel->arguments, &retval,
+ "retval", 0) == 0)
+ own_retval = 0;
}
if (stel->arguments != NULL)