From: compudj Date: Fri, 2 Dec 2005 18:50:56 +0000 (+0000) Subject: fix strlen + \0 X-Git-Tag: v0.12.20~2128 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=caabcb432b5b0a4a4955562cfc0bebb0d32ca5df;p=lttv.git fix strlen + \0 git-svn-id: http://ltt.polymtl.ca/svn@1361 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/genevent-new/genevent.c b/genevent-new/genevent.c index 41294260..4151c64a 100644 --- a/genevent-new/genevent.c +++ b/genevent-new/genevent.c @@ -1089,7 +1089,7 @@ int print_type_write_fct(type_descriptor_t * td, FILE *fd, unsigned int tabs, fprintf(fd, "*from = obj+1;\n"); break; case STRING: - fprintf(fd, "size = strlen(obj) + 1; /* Include '\0' */\n"); + fprintf(fd, "size = strlen(obj) + 1; /* Include final NULL char. */\n"); print_tabs(1, fd); fprintf(fd, "if(buffer != NULL)\n"); print_tabs(2, fd);