Re: [PATCH 1/9] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-03-15 Thread Philippe Mathieu-Daudé
On 3/15/20 10:25 PM, Richard Henderson wrote: On 3/13/20 11:45 AM, Philippe Mathieu-Daudé wrote: +if (qemu_strtol(str + pos, &p, 16, &val) < 0 || val > 0xff) { +goto inval; +} This is doing more that *just* using qemu_strtol, it's also validating the input. I don't

Re: [PATCH 1/9] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-03-15 Thread Richard Henderson
On 3/13/20 11:45 AM, Philippe Mathieu-Daudé wrote: > +if (qemu_strtol(str + pos, &p, 16, &val) < 0 || val > 0xff) { > +goto inval; > +} This is doing more that *just* using qemu_strtol, it's also validating the input. I don't think you need to adjust the patch, just im

[PATCH 1/9] hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

2020-03-13 Thread Philippe Mathieu-Daudé
Replace strtol() by qemu_strtol() so checkpatch.pl won't complain if we move this code later. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c