Fix "allocator sizeof operand mismatch" warning
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Aug 2015 20:17:02 +0000 (16:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 14 Aug 2015 22:06:23 +0000 (18:06 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/enable_events.c

index dbba41a176264d0f9228bd5b7abfc76516216eec..1ea36598796e15864dd83253f866ecf9d80c848d 100644 (file)
@@ -586,7 +586,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);
This page took 0.028131 seconds and 4 git commands to generate.