On Thu, Jun 9, 2011 at 12:25 PM, Peter Stuge <[email protected]> wrote:
>
> +               retval = ft2232_initone(ft2232_vid[i], ft2232_pid[i], more,
> &try_more);
>

This is a good start, but what's with the function name?? How about
ft2232_init_{device,interface,ftdilib,hardware,handle,whatever} depending on
what the function actually initializes.

Another ugliness in my point of view is using the try_more parameter to
convey information about the type of success/failure. That's what return
values are for. And the more parameter apparently only selects whether the
diagnostic should be a warning or an error. Seems the message belongs
outside the function, making the parameter useless. This function is
supposed to initialize hardware and shouldn't care if the caller wants to
retry with another vid/pid or not. I'll put removing those two parameters on
my todo-list unless you or someone else pitches in or feels strongly against
it.

/Andreas
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to