diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-03-16 13:46:36 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-03-16 13:46:36 +0000 |
commit | eabace12c42399f03b8ae1a19df19ac6a1b0a4c0 (patch) | |
tree | 854d0be4ac07e1f432f25c83c250d68393a38b64 /tests/perf_event_open_nonverbose.c | |
parent | c36875b1709a3ed3f21ef71a84ef5a7a936c8a8e (diff) | |
download | strace-eabace12c42399f03b8ae1a19df19ac6a1b0a4c0.tar.gz |
tests: use TAIL_ALLOC_OBJECT_CONST_PTR
Automatically convert tests to use TAIL_ALLOC_OBJECT_CONST_PTR macro
with the following sed expression:
sed -ri \
's/^([[:space:]]*)(([^*]+[[:alnum:]_])( \*)?) *\*( *const )?([^ =]+) = tail_alloc\(sizeof\((\2|\*\6)\)\);/\1TAIL_ALLOC_OBJECT_CONST_PTR(\2, \6);/' \
tests/*.c
Diffstat (limited to 'tests/perf_event_open_nonverbose.c')
-rw-r--r-- | tests/perf_event_open_nonverbose.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/perf_event_open_nonverbose.c b/tests/perf_event_open_nonverbose.c index 45d7c8f23..f9bbc092f 100644 --- a/tests/perf_event_open_nonverbose.c +++ b/tests/perf_event_open_nonverbose.c @@ -62,7 +62,7 @@ static const char *printaddr(void *ptr) int main(void) { - struct perf_event_attr *attr = tail_alloc(sizeof(*attr)); + TAIL_ALLOC_OBJECT_CONST_PTR(struct perf_event_attr, attr); attr->type = PERF_TYPE_HARDWARE; attr->size = sizeof(*attr); |