From: Jérémie Galarneau Date: Fri, 7 Aug 2015 20:17:02 +0000 (-0400) Subject: Fix "allocator sizeof operand mismatch" warning X-Git-Tag: v2.8.0-rc1~504 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=1940b29e34a4e77db05fbee32fbcc1118e6e8215 Fix "allocator sizeof operand mismatch" warning Addresses benign scan-build waring: Result of 'realloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **' Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index f1d04581f..356fef4a0 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -632,7 +632,7 @@ int check_exclusion_subsets(const char *event_name, goto error; } new_exclusion_list = realloc(exclusion_list, - sizeof(char **) * (exclusion_count + 1)); + sizeof(char *) * (exclusion_count + 1)); if (!new_exclusion_list) { PERROR("realloc"); free(string);