[PATCH] examples/perfcounter/perf_writer.c: fix memset
Jeremy Allison
jra at samba.org
Tue Mar 29 16:17:30 UTC 2016
On Tue, Mar 29, 2016 at 05:33:14PM +0200, Aurélien Aptel wrote:
> Hi,
>
> Another PVS fix.
>
> memset is called with the wrong size.
>
> Please review&push
Reviewed-by: Jeremy Allison <jra at samba.org>, can I
get a second Team reviewer ?
> --
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
> SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
> Nürnberg)
> From f62b215fc25379e41cfee46e99aab86144a189f3 Mon Sep 17 00:00:00 2001
> From: Aurelien Aptel <aaptel at suse.com>
> Date: Tue, 29 Mar 2016 17:30:36 +0200
> Subject: [PATCH] examples/perfcounter/perf_writer.c: fix memset
>
> Signed-off-by: Aurelien Aptel <aaptel at suse.com>
> ---
> examples/perfcounter/perf_writer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/perfcounter/perf_writer.c b/examples/perfcounter/perf_writer.c
> index 4260f95..054d9e8 100644
> --- a/examples/perfcounter/perf_writer.c
> +++ b/examples/perfcounter/perf_writer.c
> @@ -77,7 +77,7 @@ void output_perf_desc(PerfCounter counter, RuntimeSettings rt)
> void initialize(PERF_DATA_BLOCK *data, RuntimeSettings *rt, int argc, char **argv)
> {
> memset(data, 0, sizeof(*data));
> - memset(rt, 0, sizeof(*data));
> + memset(rt, 0, sizeof(*rt));
>
> parse_flags(rt, argc, argv);
> setup_file_paths(rt);
> --
> 2.1.4
>
More information about the samba-technical
mailing list