Start packet mmap work
[babeltrace.git] / types / float.c
index eef123c8d05593c611ad527f929b383797618757..3b2523e24f5c6fee571c367852b04667a9f8d88a 100644 (file)
@@ -42,7 +42,8 @@ void float_copy(struct stream_pos *destp,
                double v;
 
                v = fsrc->double_read(srcp, float_declaration);
-               fdest->double_write(destp, float_declaration, v);
+               if (fdest)
+                       fdest->double_write(destp, float_declaration, v);
        }
 }
 
@@ -59,7 +60,7 @@ void _float_declaration_free(struct declaration *declaration)
 }
 
 struct declaration_float *
-       float_declaration_new(const char *name, size_t mantissa_len,
+       float_declaration_new(size_t mantissa_len,
                       size_t exp_len, int byte_order, size_t alignment)
 {
        struct declaration_float *float_declaration;
@@ -68,7 +69,6 @@ struct declaration_float *
        float_declaration = g_new(struct declaration_float, 1);
        declaration = &float_declaration->p;
        declaration->id = CTF_TYPE_FLOAT;
-       declaration->name = g_quark_from_string(name);
        declaration->alignment = alignment;
        declaration->copy = float_copy;
        declaration->declaration_free = _float_declaration_free;
@@ -77,11 +77,11 @@ struct declaration_float *
        declaration->ref = 1;
        float_declaration->byte_order = byte_order;
 
-       float_declaration->sign = integer_declaration_new(NULL, 1,
+       float_declaration->sign = integer_declaration_new(1,
                                            byte_order, false, 1);
-       float_declaration->mantissa = integer_declaration_new(NULL, mantissa_len - 1,
+       float_declaration->mantissa = integer_declaration_new(mantissa_len - 1,
                                                byte_order, false, 1);
-       float_declaration->exp = integer_declaration_new(NULL, exp_len,
+       float_declaration->exp = integer_declaration_new(exp_len,
                                           byte_order, true, 1);
        return float_declaration;
 }
This page took 0.023008 seconds and 4 git commands to generate.