summaryrefslogtreecommitdiff
path: root/tests/ustat.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/ustat.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/ustat.c')
-rw-r--r--tests/ustat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ustat.c b/tests/ustat.c
index 57bb29c27..3341c70ed 100644
--- a/tests/ustat.c
+++ b/tests/ustat.c
@@ -47,7 +47,7 @@ main(void)
long rc;
# ifdef HAVE_USTAT_H
- struct ustat *const ust = tail_alloc(sizeof(*ust));
+ TAIL_ALLOC_OBJECT_CONST_PTR(struct ustat, ust);
struct stat st;
if (stat(".", &st))
perror_msg_and_fail("stat");