aboutsummaryrefslogtreecommitdiffstats
path: root/man3/malloc.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-05-03 00:48:14 +0200
committerAlejandro Colomar <alx@kernel.org>2023-05-03 00:48:22 +0200
commitfe5dba139dc089eae4061fdc17f087e71f48b198 (patch)
tree54af56b1b0138bde9a21e99372ab68ce4d64564a /man3/malloc.3
parent5a0d9ed151e6449d978fabdd654cacc17b20a235 (diff)
downloadman-pages-fe5dba139dc089eae4061fdc17f087e71f48b198.tar.gz
man*/, man.ignore.grep: srcfix; warn about blank lines
- Use the dummy character to avoid warnings in examples. - Re-enable the warning. Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man3/malloc.3')
-rw-r--r--man3/malloc.312
1 files changed, 6 insertions, 6 deletions
diff --git a/man3/malloc.3 b/man3/malloc.3
index ad7eed2895..7c86de8e45 100644
--- a/man3/malloc.3
+++ b/man3/malloc.3
@@ -403,25 +403,25 @@ and
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))
#define MALLOC(type) MALLOCARRAY(1, type)
-
+\&
static inline void *my_mallocarray(size_t nmemb, size_t size);
-
+\&
int
main(void)
{
char *p;
-
+\&
p = MALLOCARRAY(32, char);
if (p == NULL)
err(EXIT_FAILURE, "malloc");
-
+\&
strlcpy(p, "foo", 32);
puts(p);
}
-
+\&
static inline void *
my_mallocarray(size_t nmemb, size_t size)
{