svn commit: r279877 - stable/10/sys/boot/fdt

Ed Schouten ed at 80386.nl
Sat Apr 4 09:16:31 UTC 2015


Hi Alexander,

Quick question:

2015-03-11 10:49 GMT+01:00 Alexander Motin <mav at freebsd.org>:
>         buf = (char *)malloc(sizeof(char) * sz);
> -       bzero(buf, sizeof(char) * sz);
> -
>         if (buf == NULL) {
>                 sprintf(command_errbuf, "could not allocate space "
>                     "for string");
>                 return (1);
>         }
> +       bzero(buf, sizeof(char) * sz);
>
>         idx = 0;
>         for (i = start, idx = 0; i < argc; i++) {
>

Couldn't this use calloc() instead?

Thanks,
-- 
Ed Schouten <ed at 80386.nl>


More information about the svn-src-all mailing list