Use CHAR_BIT instead of 8 for float and string
[babeltrace.git] / formats / ctf / types / string.c
index 65018c74fb128e4d6a76ba4a72bd273c5e70eca1..9cfd0a094e723800c6301e16473227009642f01b 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <babeltrace/ctf/types.h>
  */
 
 #include <babeltrace/ctf/types.h>
+#include <limits.h>            /* C99 limits */
 #include <string.h>
 
 size_t string_copy(char *dest, const char *src)
 #include <string.h>
 
 size_t string_copy(char *dest, const char *src)
@@ -31,5 +32,5 @@ size_t string_copy(char *dest, const char *src)
                goto end;
        strcpy(dest, src);
 end:
                goto end;
        strcpy(dest, src);
 end:
-       return len * 8;
+       return len * CHAR_BIT;
 }
 }
This page took 0.022748 seconds and 4 git commands to generate.