]> granicus.if.org Git - strace/blobdiff - tests/sysinfo.c
tests: extend TEST_NETLINK_OBJECT macro
[strace] / tests / sysinfo.c
index 377bdc9c1848a4b57c297fd339dea01042fd4ecd..b4b348ce3c3e6329abf0d1924ce26a93dae91fb8 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
  * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2015-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,7 +39,7 @@ main(void)
        sysinfo(NULL);
        printf("sysinfo(NULL) = -1 EFAULT (%m)\n");
 
-       struct sysinfo * const si = tail_alloc(sizeof(*si));
+       TAIL_ALLOC_OBJECT_CONST_PTR(struct sysinfo, si);
 
        if (sysinfo(si))
                perror_msg_and_skip("sysinfo");