libctf: eliminate dtd_u, part 3: functions
[deliverable/binutils-gdb.git] / libctf / ctf-serialize.c
index d8e78f361f40f536de64c0e45b27d07a093f4bbd..460ae1a510ed8e2934a05004cec4551a591171ed 100644 (file)
@@ -892,19 +892,9 @@ ctf_emit_type_sect (ctf_dict_t *fp, unsigned char **tptr)
          break;
 
        case CTF_K_FUNCTION:
-         {
-           uint32_t *argv = (uint32_t *) (uintptr_t) t;
-           uint32_t argc;
-
-           for (argc = 0; argc < vlen; argc++)
-             *argv++ = dtd->dtd_u.dtu_argv[argc];
-
-           if (vlen & 1)
-             *argv++ = 0;      /* Pad to 4-byte boundary.  */
-
-           t = (unsigned char *) argv;
-           break;
-         }
+         memcpy (t, dtd->dtd_vlen, sizeof (uint32_t) * (vlen + (vlen & 1)));
+         t += sizeof (uint32_t) * (vlen + (vlen & 1));
+         break;
 
        case CTF_K_STRUCT:
        case CTF_K_UNION:
This page took 0.028822 seconds and 4 git commands to generate.