[PATCH] [GTA02] Use different MACs for the host and for the device ends of usb link

Werner Almesberger werner at openmoko.org
Sun May 24 02:19:54 CEST 2009


Paul Fertser wrote:
> +		*p = 0;

'0' ?

> +	if (inc_hexchar(&mac[18]))
> +		if (inc_hexchar(&mac[17]))
> +			if (inc_hexchar(&mac[15]))
> +				if (inc_hexchar(&mac[14]))
> +					if (inc_hexchar(&mac[12]))
> +						inc_hexchar(&mac[11]);

Why not just use a loop ? Something like:

	for (i = 0; i != 6; i++)
		if (!inc_hexchar(mac+18-i))
			break;

(untested)

- Werner



More information about the openmoko-kernel mailing list