Commit 21bd785e84742aa8370d0084ca1bc84aa4752b8a

Authored by balrog
1 parent 9e61ec31

Remove the use of Linux / BSD specific asprintf call.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2760 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 3 deletions
hw/pxa2xx.c
... ... @@ -1518,14 +1518,13 @@ struct pxa2xx_state_s *pxa270_init(DisplayState *ds, const char *revision)
1518 1518 {
1519 1519 struct pxa2xx_state_s *s;
1520 1520 struct pxa2xx_ssp_s *ssp;
1521   - char *cpu_model;
  1521 + char cpu_model[16];
1522 1522 int iomemtype, i;
1523 1523 s = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s));
1524 1524  
1525 1525 s->env = cpu_init();
1526   - asprintf(&cpu_model, "pxa270-%s", revision);
  1526 + snprintf(cpu_model, sizeof(cpu_model), "pxa270-%s", revision);
1527 1527 cpu_arm_set_model(s->env, cpu_model);
1528   - free(cpu_model);
1529 1528  
1530 1529 s->pic = pxa2xx_pic_init(0x40d00000, s->env);
1531 1530  
... ...