On 08/02/2018 14:02, Alan Cox wrote:
On Thu, 8 Feb 2018 14:54:23 +0100
Jiri Olsa <jo...@redhat.com> wrote:
On Wed, Feb 07, 2018 at 01:45:00AM +0800, John Garry wrote:
static void print_events_table_suffix(FILE *outfp)
@@ -407,6 +469,52 @@ static char *real_event(const char *name, char *event)
+static void fixup_field(char *from, char **to)
+ *to = malloc(strlen(from));
+ strcpy(*to, from);
could you just call '*to = strdup(from)' in here?
And check for malloc returning NULL.
I should have concentrated on the coding as much as the feature being