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/file_handle.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/file_handle.c')
-rw-r--r-- | tests/file_handle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/file_handle.c b/tests/file_handle.c index 175cae0f9..d41f54af3 100644 --- a/tests/file_handle.c +++ b/tests/file_handle.c @@ -208,7 +208,7 @@ main(void) tail_alloc(sizeof(struct file_handle) + 128); struct file_handle *handle_256 = tail_alloc(sizeof(struct file_handle) + 256); - int *bogus_mount_id = tail_alloc(sizeof(*bogus_mount_id)); + TAIL_ALLOC_OBJECT_CONST_PTR(int, bogus_mount_id); char handle_0_addr[sizeof("0x") + sizeof(void *) * 2]; |