int note_type, ...)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- const void *p;
- int size;
va_list ap;
const char *fname, *psargs;
long pid;
memset (&data, 0, sizeof (data));
strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
- p = (const void *) &data;
- size = sizeof (data);
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+ &data, sizeof (data));
}
else
{
memset (&data, 0, sizeof (data));
strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
- p = (const void *) &data;
- size = sizeof (data);
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+ &data, sizeof (data));
}
- break;
+ /* NOTREACHED */
case NT_PRSTATUS:
va_start (ap, note_type);
prstat.pr_pid = pid;
prstat.pr_cursig = cursig;
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
- p = (const void *) &prstat;
- size = sizeof (prstat);
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+ &prstat, sizeof (prstat));
}
else
{
prstat.pr_pid = pid;
prstat.pr_cursig = cursig;
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
- p = (const void *) &prstat;
- size = sizeof (prstat);
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+ &prstat, sizeof (prstat));
}
}
else
prstat.pr_pid = pid;
prstat.pr_cursig = cursig;
memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
- p = (const void *) &prstat;
- size = sizeof (prstat);
+ return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type,
+ &prstat, sizeof (prstat));
}
- break;
}
-
- return elfcore_write_note (abfd, buf, bufsiz, "CORE", note_type, p,
- size);
+ /* NOTREACHED */
}
#endif
\f