size known for alignment after variable length field
[lttv.git] / 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.022959 seconds and 4 git commands to generate.