summaryrefslogtreecommitdiff
path: root/tests/adjtimex.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/adjtimex.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/adjtimex.c')
-rw-r--r--tests/adjtimex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/adjtimex.c b/tests/adjtimex.c
index 0eff97312..d0e36306a 100644
--- a/tests/adjtimex.c
+++ b/tests/adjtimex.c
@@ -43,7 +43,7 @@ main(void)
int state = adjtimex(NULL);
printf("adjtimex(NULL) = %s\n", sprintrc(state));
- struct timex *const tx = tail_alloc(sizeof(*tx));
+ TAIL_ALLOC_OBJECT_CONST_PTR(struct timex, tx);
memset(tx, 0, sizeof(*tx));
state = adjtimex(tx);