* [PATCH] tsearch.3: Use size_t for malloc() argument
@ 2020-09-05 10:17 Alejandro Colomar
2020-09-05 15:28 ` Michael Kerrisk (man-pages)
0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar @ 2020-09-05 10:17 UTC (permalink / raw)
To: mtk.manpages; +Cc: linux-man, Alejandro Colomar
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
man3/tsearch.3 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/man3/tsearch.3 b/man3/tsearch.3
index f0ff80e8c..32ddb8127 100644
--- a/man3/tsearch.3
+++ b/man3/tsearch.3
@@ -271,6 +271,7 @@ in order.
.EX
#define _GNU_SOURCE /* Expose declaration of tdestroy() */
#include <search.h>
+#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
@@ -278,7 +279,7 @@ in order.
static void *root = NULL;
static void *
-xmalloc(unsigned n)
+xmalloc(size_t n)
{
void *p;
p = malloc(n);
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tsearch.3: Use size_t for malloc() argument
2020-09-05 10:17 [PATCH] tsearch.3: Use size_t for malloc() argument Alejandro Colomar
@ 2020-09-05 15:28 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-09-05 15:28 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
On 9/5/20 12:17 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
> ---
> man3/tsearch.3 | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks, Alex. Patch applied?
Cheers,
Michael
> diff --git a/man3/tsearch.3 b/man3/tsearch.3
> index f0ff80e8c..32ddb8127 100644
> --- a/man3/tsearch.3
> +++ b/man3/tsearch.3
> @@ -271,6 +271,7 @@ in order.
> .EX
> #define _GNU_SOURCE /* Expose declaration of tdestroy() */
> #include <search.h>
> +#include <stddef.h>
> #include <stdlib.h>
> #include <stdio.h>
> #include <time.h>
> @@ -278,7 +279,7 @@ in order.
> static void *root = NULL;
>
> static void *
> -xmalloc(unsigned n)
> +xmalloc(size_t n)
> {
> void *p;
> p = malloc(n);
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-05 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 10:17 [PATCH] tsearch.3: Use size_t for malloc() argument Alejandro Colomar
2020-09-05 15:28 ` Michael Kerrisk (man-pages)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.