summaryrefslogtreecommitdiff
path: root/tests/file_handle.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-03-16 13:46:36 +0000
committerDmitry V. Levin <ldv@altlinux.org>2017-03-16 13:46:36 +0000
commiteabace12c42399f03b8ae1a19df19ac6a1b0a4c0 (patch)
tree854d0be4ac07e1f432f25c83c250d68393a38b64 /tests/file_handle.c
parentc36875b1709a3ed3f21ef71a84ef5a7a936c8a8e (diff)
downloadstrace-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.c2
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];