size known for alignment after variable length field
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 11 Nov 2005 19:44:07 +0000 (19:44 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 11 Nov 2005 19:44:07 +0000 (19:44 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1323 04897980-b3bd-0310-b5e0-8ef037075253

genevent-new/gentest.c

index b0908ccfcc11dfeddfc90da5dfcff3c1df6c1eed..a918d5415eb08be838bdf060ab96d316a9ca6570 100644 (file)
@@ -222,7 +222,7 @@ static inline void lttng_write_sequence_mystruct_mysequence(
        *to = ltt_align(*to, sizeof(void *));
        *to_base = *to_base+*to;
        *to = 0;
-       
+
        /* Put source *from just after the C sequence */
        *from = obj+1;
 }
@@ -390,11 +390,11 @@ static inline void lttng_write_mystruct(
 
        /* Variable length field */
        lttng_write_sequence_mystruct_mysequence(to_base, to, from, len, &obj->mysequence);
+       *to = 0;        /* Force the compiler to know it's 0 */
        /* After this previous write, we are sure that *to is 0, and *to_base is
         * aligned on the architecture size : to rest of alignment will be calculated
         * statically. */
 
-
        lttng_write_mystruct_myunion(to_base, to, from, len, &obj->myunion);
 
        /* Don't forget to flush last write..... */
This page took 0.027095 seconds and 4 git commands to generate.